When moving to the swift-4.0-branch of LLVM, we started using the
LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING cmake option to turn off those
checks. This was necessary for the stdlib build, where it uses some LLVM
headers without linking libSupport.a, but the cmake option forced us to
disable the checks across the board. It also caused a lot of churn for
people who needed to remove their cmake caches when switching to the new
version of LLVM. This change switches to use a preprocessor macro to
disable the checks only in the context of the stdlib build. It requires
LLVM r295090. rdar://problem/30098953
Fixed for the difference of Cygwin with other Windows variants (MSVC,
Itanium, MinGW).
- The platform name is renamed to "cygwin" from "windows" which is used
for searching the standard libraries.
- The consideration for DLL storage class (DllExport/DllImport) is not
required for Cygwin and MinGW. There is no problem when linking in
these environment.
- Cygwin should use large memory model as default.(This may be changed
if someone ports to 32bit)
- Cygwin and MinGW should use the autolink feature in the sameway of
Linux due to the linker's limit.
If cmake is run on another machine, the default Xcode path and
more in the cmake cache and ninja files will be of that machine's
configuration, not the local machine's.
Test with:
./utils/build-script -r -- --distcc --verbose
The cmake lines should start with ``/usr/local/bin/cmake`` instead of with
``/opt/distcc/pump``.
rdar://problem/29942258
- <rdar://problem/27791475>
SwiftPM can now be built in release mode because all the outstanding
issues preventing that has been resolved. The major issues were:
* Building (and running) unit tests with @testable import in
* release. (swiftpm PR #758)
* Linker errors when building unit tests with wmo on linux. (SR-3034)
This was enabled in September (208e82f), and although it works most of the
time, we are running into some problems that depend on the specific version
of Clang. We should hold off using modules until they are more robust.
rdar://problem/29627138
This is a new version of my previous commit 411a05b7. I see now that
I had added the setting in code that is not used for Linux. This moves
it to a better place that should apply to all builds.
and its transitive closure of overlay dependencies.
[utils]:find-overlay-deps-closure.sh: Add a bash script to find the
closure of all other overlays required by a target overlay.
This reverts commit 411a05b753.
This did not work on Linux. Rather than fixing it in the build script,
I am changing the swift-llvm default for this setting to disable the checks.
The Swift runtime uses some header-only code from LLVM's ADT classes,
but we do not want to link libSupport into the runtime. These checks rely
on the presence of symbols in libSupport to identify how the code was
built and cause link failures for mismatches. Without linking that library,
we get link failures regardless, so instead, this just disables the checks.
- Add --libicu option to compile icu from source. This allows the
configuration to be controlled so that it is enabled for shared
and static building and the static files dont require the use of
the dynamic loader
- Add --install-libicu option to install the shared libraries into
$prefix/lib/swift and the static ones into $prefix/lib/swift_static.
This avoids interference with system installed versions
- Dont use find_package if building ICU from source
separate steps so that if the target does not exist the script will fail
instead of continuing. `set -e` is supposed to fix this, but since the
command is empty if the target doesn't exist, the subshell returns 0 and
the script continues.
Also, print out the cmake and ninja commands so that we don't hide so much
of the machinery.
Fixes rdar://problem/29003970