Commit Graph

1328 Commits

Author SHA1 Message Date
Michael Gottesman
9010c1b6f3 Merge pull request #33760 from gottesmm/pr-1d2143f460a9d74a60af3be92d03f404a9cde805
Revert "build-script: remove dead CMake options for Swift"
2020-09-14 16:39:56 -07:00
Dave Lee
157505196a [build-script] Disable pkg-config for Darwin hosts 2020-09-14 08:14:26 -07:00
Kuba (Brecka) Mracek
d9d929a594 Revert "Start using optimization (-O0/-O2/-O3/-Os) and debug (-g) flags from CMAKE_CXX_FLAGS_${CFLAGS_BUILD_TYPE} (#33388)" (#33924) 2020-09-11 21:06:05 -07:00
Kuba (Brecka) Mracek
aa0f8e670b Add a SWIFT_STDLIB_OS_VERSIONING flag to avoid querying OS version at runtime, use it in the freestanding build (#33791) 2020-09-11 08:09:14 -07:00
Saleem Abdulrasool
b9d1b989e9 Merge pull request #33489 from compnerd/additional-paths
build: add additional search paths for Foundation artifacts
2020-09-05 07:41:41 -07:00
Saleem Abdulrasool
2b67a9de7d Merge pull request #33774 from compnerd/timeout
utils: add a timeout to the integration tests
2020-09-04 13:41:53 -07:00
Saleem Abdulrasool
9f01742d94 Update build-script-impl
Fix quoting
2020-09-03 09:38:46 -07:00
Saleem Abdulrasool
8125f772a0 Update build-script-impl
Reduce timeout to 20m
2020-09-02 15:47:07 -07:00
Saleem Abdulrasool
66059a4935 utils: add a timeout to the integration tests
This will allow us to add test cases which may hang.  The timeout here
is taken from the value we use in the regular test suite (along with the
check for the timeout requirements).
2020-09-02 22:40:23 +00:00
Kuba (Brecka) Mracek
bfc9b5447f Add llvm-nm to list of LLVM tools built with stdlib standalone mode (#33681) 2020-09-02 13:49:01 -07:00
Michael Gottesman
c8d4d168f7 Revert "build-script: remove dead CMake options for Swift"
This reverts commit 95102bc258.

This is actually a dead option that is relied upon for some configurations. I am
going to add a note to not touch the option.

I talked with compnerd about this and they are cool with this.

I think that we can redo this in a nicer way when we are further into the
build-script-impl refactoring.

I added a note to the code to explain that it isn't dead.
2020-09-02 10:58:36 -07:00
Mishal Shah
bf7c03b1f6 Support cross compile Xcode toolchain for Apple Silicon
Support cross compile Xcode toolchain for Apple Silicon

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to LLVM

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to cmark

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to lldb

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to llbuild

* Add llbuild CMake options array to provide DCMAKE_OSX_ARCHITECTURES

* [Build System] Use one install package for cross compile hosts

* Remove Lipo before non-build-script-impl products

* Add support to only lipo without running installable package tests

* [Build System] Support cross compile install prefix for SwiftPM product in Swift Build Support

* Use cross compile toolchain path for indexstoredb and swift-driver

* Use cross compile toolchain path for swiftpm, swiftsyntax, swiftformat, and skstresstester

* Add cross compile toolchain support to Benchmarks, and fix the python lint issue in skstresstester.py

* [SwiftPM] Add support for cross-compile-hosts flag to build swiftpm using bootstrap script
2020-09-02 10:14:51 -07:00
Eric Miotto
853586fc07 [build] Reinstate CMAKE_CXX_FLAGS_${CFLAGS_BUILD_TYPE} for LLVM (#33745)
Set those at the value pre #33388 -- this would avoid regressions
of disk space usage (in particular around building Swift LTO)

Addresses rdar://68091272
2020-09-01 15:31:33 -07:00
Michael Gottesman
af4199e4f6 [build-toolchain] Add an option to control if code built by the toolchain links by default to the OS runtime or the toolchain runtime.
Today by default, we always link against the runtime runtime. This option just
lets our users decide what they want, but leaves the defaults alone.
2020-08-31 11:06:46 -07:00
Kuba (Brecka) Mracek
7a6f84dc64 When building standalone stdlib, explicitly use C/C++ compilers from NATIVE_CLANG_TOOLS_PATH (#33675) 2020-08-28 20:50:20 -07:00
Eric Miotto
102d6387d9 [build] Don't execute dsymutil in parallel (#33654)
`dsymutil` is already multithreaded and can be memory intensive --
execute it one at a time.

Addresses rdar://63892559
2020-08-27 10:25:51 -07:00
Kuba (Brecka) Mracek
9de7b59388 Subsume SWIFT_STDLIB_USE_NONATOMIC_RC into SWIFT_STDLIB_SINGLE_THREADED_RUNTIME (#33643) 2020-08-26 21:28:30 -07:00
Kuba (Brecka) Mracek
9ead8d57fa Add a single-threaded stdlib mode, use it for the 'minimal' stdlib (#33437) 2020-08-25 06:03:14 -07:00
Michael Gottesman
611d4b8307 [gardening] PlaygroundSupport is a build-script product now... remove dead-code remnants.
Just deleting dead code.
2020-08-22 18:49:55 -07:00
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
Saleem Abdulrasool
85d6f51743 build: add additional search paths for Foundation artifacts
This allows us to homogenise the foundation build artifacts with
swift-tools-support-core, swift-driver, swift-package-manager,
swift-numerics, swift-argument-parser.
2020-08-14 14:23:12 -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