WIP: Xcode: Use "new build system" from Xcode 10
The primary challenge here is to fix custom command generation for the new build system.
Xcode 9 introduced an optional "New Build System". Xcode 10 uses
it by default. The new build system needs to know what inputs and
outputs are relevant to a script build phase. One day this may
allow us to generate a separate build phase for each custom command,
but for now we continue to package multiple custom commands into
one build phase and use make
internally. For this we need to
compute a union of inputs and outputs for the whole phase.
We also need to support projects using add_custom_target
or other rules that are documented to execute every time and are never considered up to date. The Xcode "new build system" does not provide a documented way to do this. Add an extra input that does not initially exist and that is updated with a new time stamp every time the phase runs. That seems to convince the new Xcode build system to run the phase every time, though may depend on undocumented implementation details of Xcode and is not future-proof.
Issue: #18070, #18088 (closed)