Commit Graph

1008 Commits

Author SHA1 Message Date
Kuba (Brecka) Mracek
db18deaf91 Add a SWIFT_RUNTIME_MACHO_NO_DYLD stdlib mode that doesn't dynamically look up sections in modules, and only assumes a single static module (#33441) 2020-08-18 11:46:42 -07:00
Kuba (Brecka) Mracek
28a2826ef4 Start using optimization (-O0/-O2/-O3/-Os) and debug (-g) flags from CMAKE_CXX_FLAGS_${CFLAGS_BUILD_TYPE} (#33388) 2020-08-17 19:26:24 -07:00
Kuba (Brecka) Mracek
aa924196ff Add a flag to build the stdlib without COMPATIBILITY_OVERRIDE (#33438) 2020-08-14 17:06:38 -07:00
Kuba (Brecka) Mracek
e2e69578a6 For the 'minimal' stdlib, disable Objective-C interop (#33427) 2020-08-13 15:26:04 -07:00
Kuba (Brecka) Mracek
ef89b0dc51 Add a 'standalone_minimal' preset to build a minimal, static, OS independent, self-contained binaries of stdlib. (#33286) 2020-08-12 07:28:34 -07:00
swift-ci
2a5af15d39 Merge pull request #33154 from buttaface/flags 2020-08-11 15:03:48 -07:00
Mishal Shah
9adbace823 Remove compiler-rt from install targets for cross compile host 2020-08-05 23:54:29 -07:00
Mishal Shah
bb356d3ac1 Don't run LLDB cross compile host test suite 2020-08-05 23:52:40 -07:00
Mishal Shah
ceeb7245f1 Don't build SwiftUnitTests for cross compile host 2020-08-05 23:51:24 -07:00
Alex Lorenz
817f0e7570 Add missing -f to check which checks if a compiler-rt archive is present 2020-07-29 10:10:44 -07:00
Butta
587973fd8b [build] Remove unemployed 'skip-{build,test}-*' flags from build-script-impl
These flags have done nothing for awhile, as 26 of 31 have already been moved to
build-script. Only the flags related to haiku, maccatalyst, and external-benchmarks
are unrecognized by either build script after this removal.
2020-07-28 12:32:44 +05:30
Alex Lorenz
3320d236e7 [build-script] copy over the simulator libclang_rt.*.a libraries to allow clang to link with them
Clang's driver started linking with libclang_rt.<os>sim.a when building for simulator.

Swift's build need to adapt to this clang change, by ensuring that the libclang_rt.<os>sim.a libraries are created during the build
2020-07-27 13:07:21 -07:00
Mishal Shah
3dc8b38bbe Merge pull request #32922 from buttaface/prebuilt
[build] extend support for building with a prebuilt toolchain to the corelibs and llbuild
2020-07-23 12:29:33 -07:00
Butta
c969814a11 [build] Fix --skip-build-llvm so that its minimal targets, like tblgen, are still built 2020-07-18 03:45:17 +05:30
Butta
32d341e244 [build] extend support for building with a prebuilt toolchain to the corelibs and llbuild 2020-07-17 14:35:15 +05:30
Nathan Hawes
90594eeaf3 [build-script-impl] Simplify libcxx build step
Fixes ninja: error: unknown target 'cxx-headers' on master-next after an
upstream llvm change.
2020-07-16 11:02:10 -07:00
Vedant Kumar
b77d68a9f3 [build-script] Tie llvm, swift, and lldb to the same sysroot
rdar://62895058
2020-07-09 17:10:17 -07:00
Mishal Shah
a930b51494 [Apple Silicon] Simulator support for arm64 2020-07-02 19:17:29 -07:00
Mishal Shah
2aef2c5fe3 [Apple Silicon] Fix cross-compilation in Xcode trains where we're not building stdlib at all 2020-07-02 18:25:44 -07:00
Mishal Shah
7009e2e48e [Apple Silicon] [build-script] Fix lipo step invocation with --no-legacy-impl.
LIPO_SRC_DIRS wasn't set for '--only-execute merged-hosts-lipo',
because the logic was skipped for actions other than install.
2020-07-02 18:24:43 -07:00
Mishal Shah
52184700ee [Apple Silicon] Build system configuration to support arm64 macOS 2020-07-02 18:23:52 -07:00
Mishal Shah
24a48efe7e [Apple Silicon] [build-script] Fix cross-compile check. 2020-07-02 18:22:52 -07:00
Mishal Shah
91a1dc445f [Apple Silicon] [build-script] Build compiler-rt even when cross-compiling
clang and compiler-rt are rev-locked and should match.  Currently, we build clang (and use it to bootstrap the rest) but don't build compiler-rt.  We should.

This doesn't completely achieve that: this only makes us build compiler-rt for the local host.

This used to be pretty much impossible, but, since then, compiler-rt cmake support was rewritten.

We should build it for the other hosts as well, but that's trickier, because we'd need to make the cross-compiled compiler-rt build use a separate just-built clang (from the local host). We do that for the other projects, but compiler-rt is special (because it's cmake'd as a runtime part of clang/llvm).
2020-07-02 18:22:04 -07:00
Mishal Shah
ee1ea6e514 [Apple Silicon] Support building for macOS arm64/arm64e 2020-07-02 18:03:39 -07:00
Jonas Devlieghere
4d3bd22c4e Merge pull request #32436 from kastiglione/dl/build-script-prioritize-sdk-paths-in-cmake-find_-functions
[build-script] Prioritize SDK paths in CMake find_ functions
2020-06-29 14:53:47 -07:00
Dave Lee
562a254dde expand comment to explain user overrides 2020-06-17 15:03:28 -07:00
Doug Gregor
e06bccdb65 [build-script] Don't hardcode sqlite3 location; use the SDK. 2020-06-17 10:28:06 -07:00
Dave Lee
c71ed97888 [build-script] Prioritize SDK paths in CMake find_ functions 2020-06-17 09:59:58 -07:00
Michael Gottesman
452b6dd08f [build-script-impl] Require --install-llvm to be passed in to install llvm.
Before this patch, we assumed that if LLVM_INSTALL_COMPONENTS was non-empty that
we wanted to install llvm. This is different than /every other/ product in
build-script-impl where INSTALL_$PRODUCT controls if an install is attempted. If
a components sort of thing is required, we force it to only be a configuration
of an option that is a no-op if INSTALL_$PRODUCT is set to true.

I went through build-presets and looked at every place we had an install
statement and added install-llvm when appropriate. This was generally when we
did an install-swift. The one special case is with the tsan_libdsipatch
test. That being said, if I was too aggressive with where I put these
install-llvm, no harm will result since in those cases LLVM_INSTALL_COMPONENTS
had to be empty previously anyways (since otherwise we would have attempted an
install).
2020-06-08 14:11:32 -07:00
Adrian Prantl
6ec007a003 Further reduce the number of parallel jobs when testiong LLDB under ASAN 2020-05-21 10:52:10 -07:00
Michael Gottesman
2b2b5b8f08 [benchmarks] Remove cmake based external perf testsuite build.
If we do an external benchmark build, we will do it via the toolchain benchmark
build-script job. This will be simpler by allowing us to build against a just
built toolchain and separate us from the rest of swift's main CMakeLists.txt.
2020-05-10 14:16:14 -07:00
Michael Gottesman
edfbf57de2 [build-script] On non-Darwin build lld by default.
This will let us use lld to link the stdlib. This will allow us to
avoid problems due to old compilers being used on certain older distributions
that we support.

If anyone wants to not build lld, they can just pass to build-script-impl
--skip-build-lld
2020-05-07 17:42:58 -07:00
Max Desiatov
70e86c3633 [NFC] Fix comment typo in build-script-impl 2020-04-30 19:24:39 +01:00
Eric Miotto
b309c62a75 [build] set CMAKE_OSX_ARCHITECTURES in swift_cmake_options (#31414)
This augments #31023 to make sure CMake invokes the compiler checks
correctly -- this is needed to avoid errors in certain
configurations.

Addresses rdar://62339814
2020-04-30 09:34:36 -07:00
Butta
16d599ecfa [build-script-impl] Allow cross-compiling the host toolchain for Android 2020-04-21 15:53:32 +05:30
Davide Italiano
6e6761e4c4 Merge pull request #31023 from apple/also-swift-needs-that
[build-script] Pass CMAKE_OSX_SYSROOT to swift_cmake_options too.
2020-04-15 12:00:59 -07:00
Mishal Shah
050123283b Merge pull request #31012 from apple/shahmishal/drop-swift-api-digester-dsym
Disable creating swift-api-digester dSYM to reduce toolchain size
2020-04-14 17:44:01 -07:00
Davide Italiano
e60fe92f61 [build-script] Pass CMAKE_OSX_SYSROOT to swift_cmake_options too. 2020-04-14 13:27:40 -07:00
Mishal Shah
0f5bdb4949 Add a comment for removing debug symbols for swift-api-digester from the toolchain 2020-04-14 10:51:44 -07:00
Mishal Shah
9ae46a3473 Disable creating swift-api-digester dSYM to reduce toolchain size 2020-04-14 09:30:50 -07:00
Saleem Abdulrasool
fa6bedeccd build: explicitly pass the path to python2,python3
Explicitly pass the path to the python interpreter on macOS by using
`xcrun` to find the tools.
2020-04-13 20:29:29 -07:00
Robert Widmann
22b0526917 Merge pull request #30082 from 3405691582/OpenBSD_Port_Build
Build system recognizes OpenBSD.
2020-04-12 09:30:17 -07:00
Doug Gregor
044613a13b [build-script] Add -simulator to simulator target triples. 2020-04-06 16:52:56 -07:00
3405691582
f8d0174b85 Build system recognizes OpenBSD.
Commit for CMake and build scripts to recognize OpenBSD. To keep this
commit relatively short, this just deals with the rather simple and
uncontroversial changes to the build system.

Note that OpenBSD calls "x86_64" as "amd64", Since the Swift stdlib will
be put in a subdirectory named after ARCH, to ensure the standard
library is properly found later, we use the native architecture name for
OpenBSD in the build system rather than trying to deal with the
difference the other way around.
2020-04-03 13:34:17 -04:00
Fred Riss
a4c5671a5f [build-script-impl] Pass host tools to LLDB's Cmake when cross-compiling 2020-03-27 13:41:26 -07:00
Adrian Prantl
7d699120b4 build-script: Avoid re-runnning the entire LLDB test suite twice. 2020-03-13 16:32:46 -07:00
Adrian Prantl
e676286c97 build-script: Rerun all lldb Swift tests with DWARFImporter.
rdar://problem/57880844
2020-03-12 19:34:23 -07:00
Kuba (Brecka) Mracek
ab6533a40f Merge branch 'master' into mracek/arm64e 2020-03-06 15:07:01 -08:00
Davide Italiano
af29f5dd3a [build-script] Allow primary-variant-arch and primary-variant-sdk to be set independently.
It's unclear why they're grouped, and it's also confusing.
2020-03-04 12:31:43 -08:00
Kuba Mracek
45ba5cec05 [arm64e] Add arm64e support into Swift's build system 2020-02-27 16:08:15 -08:00