Xcode 10 sets ARCH/CURRENT_ARCH to "undefined_arch", resulting in incorrect linker args
The new build system passes
undefined_archas the value for the ARCH environment variable when running shell script build phases. The value was previously not well defined. Any shell scripts depending on this value must behave correctly for all defined architectures being built, available via the ARCHS environment variable.
This seems to apply in multiple places; I've seen CMake emitting that in toolchain files in the CMakeFiles directory when CMake is run from a shell while Xcode 10 is selected via
xcode-select (maybe it's getting it from
xcbuild or some other tool, somehow?).