I had Xcode 9.2 installed and I built it using Ninja as per the documentation.
When I run this command,
utils/build-script --release-debuginfo
I got the above output.
I installed Xcode 9.3 Beta and then again ran this command. It gives me the same error.
Maybe I should clean before compiling again ?
Blowing away the build folder when switching Xcode's is a little drastic but works for me. There's also --reconfigure to build-script, which might be more surgical.
Can you also run xcode-select -p to make sure that the 9.3 beta is the current Xcode selected? The command flag it's complaining about seems to be a relatively recent change, at least from LLVM's bug reports.
CC @Bob_Wilson, who might know more (or know someone who does) about which linker is part of which Xcode, and when that flag was supported.
I am building swift using the option --clean right now. I will try the --release-debug option after this.
What is the difference between these ? Any documentation ?
I don't know, I only use build-script for initial configuration. I doubt that --clean blows aways CMake's configuration, it likely just erases build artifacts. I would try to rm -rf the build folder and re-run.
@Rostepher would know more, as well as the status of any build-script documentation.
I'm saying that --clean is probably not sufficient for what you want to do, since you care about configuration and not build artifacts. --reconfigure has a chance of working, but the best bet is to blow away the build directory.
Apple's linker does not support --color-diagnostics (in any version). The strange thing here is that it appears to be failing in the CMake check to see if that option is supported. The failure should not be fatal.
Open a virtual environment using python 2. As I use Anaconda, conda create -n python2 python=2.7 anaconda
or you can do virtualenv --python=/usr/bin/python2.7 <path/to/new/virtualenv/>
Activate the virtual environment by using either of these commands. source activate <virtualenv> source ./<path/to/new/virtualenv/bin/activate>
Then continue the build process. ( as per README ) utils/build-script --release-debuginfo
I think there should be a line in README indicating that python 2 must be used.
Am I wrong ?