Propagate DCMAKE_Swift_COMPILER_TARGET with the host architecture of the
variant we're trying to build so CMake will forward the correct -arch
- which is to say, the triple of the host we're trying to build against,
not the machine that it's building on currently.
Resolves rdar://80383591, SR-14904
* Make the `build-parser-lib` script more flexible on how it finds the llvm source path
* Make sure `swift-syntax-parser-test` can be built even though the script disables building for testing
* Fix a linker error for parser-only build
There's no reason to use -m${platform}-version-min as of clang-11/Xcode 11. Clang is now smart enough to parse -target and provide Apple's ld with the appropriate -platform_version argument string.
* Need to symlink 'swift' into 'llvm-project' since we are doing a unified configure with 'swift' as an external project.
* Need to set "-DLLVM_ENABLE_LIBEDIT=FALSE" to get iOS builds working again
The utils/dev-scripts/at-to-filelist, utils/dev-scripts/split-cmdline and utils/build-parser-lib scripts needed to be reformatted with the black tool to agree with the linter.
This new module uses the build_swift.shell.ExecutableWrapper API to create a wrapper class around 'xcrun'. The wrapper class is instantiated and exposed under the name build_swift.wrappers.xcrun.
To achieve this the script does a single unified CMake configuration for
llvm/clang/swift and builds only the parser library target.
This mechanism is fundamentally different from build-script, which builds llvm/clang
in a separate build directory than swift.
Even though this bypasses build-script, it does share some underlying helper
utilities from the python infrastructure.
This utility also provides capability to gather profile data and build the parser
library with PGO optimization enabled.