Linking directories from `_add_variant_link_flags` of were overwritten
in `_add_swift_executable_single` by not using the
`LIBRARY_SEARCH_DIRECTORIES` parameter.
`LIBRARY_SEARCH_DIRECTORIES` is actually being used as
`RESULT_VAR_NAME` to affect the value on the parent scope. In this
context `LIBRARY_SEARCH_DIRECTORIES_VAR_NAME` sounds like a better name.
PIC on windows does not make sense. All code is position independent.
Currently clang and LLVM do the wrong thing and generate ELF style PIC
code on Windows when `-fPIC` is used. Add `-fno-pic` to disable that
when cross-compiling to Windows.
When the code was refactored, the old variable name `libkind` was left
in a couple of spots. Update them to `kind`. Remove unnecessary
quoting which would have exposed this bug.
Introduce a swift_target_link_search_directories which allows you to
append a search path to the linker. This interface also allows a tweak
to make the library search directory addition more portable across
compilers (e.g. cl vs clang).
for sib/sibgen files for libraries without building them by default.
This will let engineers just cd into the build directory and type:
ninja swift-stdlib-sib
ninja swift-stdlib-sibgen
To generate sib and sibgen files respectively.
There are still some dependency issues in between the sib targets, so to get
this to work well, I would suggest doing a full build and then using these
targets.
These headers should be treated as system headers as we do not control them.
Use target_include_directories so that we can use the `SYSTEM` option to
indicate that they are system headers. It also simplifies the invocation by not
directly modifying the underlying property.
These are the commands Pete added in 5834df3, doing slightly more work
by compiling Swift sources twice in order to start building downstream
libraries sooner.
Really, we should diagnose when -embed-bitcode is passed here, instead
of generating nonsense commands and then falling over. I filed
https://bugs.swift.org/browse/SR-3352 for that.
rdar://problem/29537164
- Add ImageInspectionStatic.cpp to lookup protocol conformance
and metadata sections in static binaries
- For Linux, build libswiftImageInspectionShared.a and
libswiftImageInspectionStatic.a for linking with libswiftCore.a.
This allows static binaries to be built without linking to
libdl. libswiftImageInspectionShared (ImageInspectionELF.cpp) is
automatically compiled into libswiftCore.so
- Adds -static-executable option to swiftc to use along with
-emit-executable that uses linker arguments in
static-executable-args.lnk. This also requires a libicu
to be compiled using the --libicu which has configure options
that dont require libdl for accessing ICU datafiles
- Static binaries only work on Linux at this time
In which case the 'SWIFT_INSTALL_[component]' will be FALSE.
This is useful to get the behavior where all components are set to install by default and exclude just a specific one.
We need to actually have a module name and outputs or else the add_custom_command will try to
generate multiple commands all with the name NOTFOUND.
Note, this bug was introduced in 5834df33f9 via PR #5472.
Currently SwiftOnoneSupport.o waits on Swift.o to finish compiling before we start
compiling SwiftOnoneSupport.o. We don't need the .o for compilation but instead just
need Swift.swiftmodule which we were generating anyway.
This change causes .o and { .swiftmodule, .swiftdoc } to be built independently of each
other. Downstream compiles only wait on the module while downstream links wait on the .o.
Given that .apinotes are sometimes used by swiftc invocations, this also separates out
apinotes in to its own step which these other commands can both depend on.
The result of this is a 30% improvement in building the stdlib with -R and 20% with -d.
Specifically, -R drops from 3m to 2m and -d drops from 12m to just under 10m.
Fixes the Android build, and makes some adjustments for Android NDK r13.
* Fix FindICU.cmake to properly set the `SWIFT_${sdk}_ICU_UC` and
`SWIFT_${sdk}_ICU_I18N` values. These were not properly set because
"uc" and "i18n" were lowercase.
* Adapt `add_swift_library` to parse `ICU_UC` and `ICU_I18N` for
private link libraries and use the proper `SWIFT_${sdk}_ICU_*` values.
* NDK r13 removes a subdirectory from the llvm-libc++ includes path.
Adapt to this change, and add a FIXME to address this issue before it
may break again.
* Update the documentation to point to a new libicu download for NDK 13.