Commit Graph

511 Commits

Author SHA1 Message Date
Bob Wilson
c765d5e3a5 Merge remote-tracking branch 'origin/master' into master-next 2017-01-12 15:58:19 -08:00
Doug Coleman
6e10ed61e1 build-script-impl: Don't let distcc farm out cmake to run on other machines.
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
2017-01-12 13:53:58 -08:00
Bob Wilson
cf3a0458f2 Merge remote-tracking branch 'origin/master' into master-next 2017-01-10 09:05:23 -08:00
swift-ci
294359bd69 Merge pull request #4804 from kstaring/master 2017-01-10 00:01:46 -08:00
Bob Wilson
37e7d1c627 Merge remote-tracking branch 'origin/master' into master-next 2017-01-08 17:07:46 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Bob Wilson
78b28243ff Merge remote-tracking branch 'origin/master' into master-next 2017-01-03 14:22:59 -08:00
Ankit Aggarwal
85dbbb9bd7 Merge pull request #6432 from aciidb0mb3r/build-swiftpm-in-release
[BuildScript] Pass build conf to swiftpm
2016-12-22 23:25:01 +05:30
Maxwell Swadling
50b3dcb370 Only disable CLANG_TOOL_DRIVER_BUILD when BUILD_RUNTIME_WITH_HOST_COMPILER is on 2016-12-21 15:31:45 -08:00
Maxwell Swadling
6fb7c89151 removed CLANG_TOOL_DRIVER_BUILD from install toolchain only since it is now used as part of building 2016-12-21 13:16:04 -08:00
Ankit Aggarwal
1ba5ce6774 [BuildScript] Pass build conf to swiftpm
- <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)
2016-12-21 14:57:40 +05:30
Bob Wilson
7da7e17057 Stop building llvm with modules enabled.
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
2016-12-14 15:14:11 -08:00
Bob Wilson
deddf19aae Merge remote-tracking branch 'origin/master' into master-next 2016-12-13 10:23:03 -08:00
Bob Wilson
4081418e04 Try again to not enforce checks for LLVM's ABI-breaking build settings.
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.
2016-12-09 22:16:12 -08:00
Doug Coleman
ca9026a720 [cmake]: Allow a --darwin-overlay-target=CloudKit to build one overlay
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.
2016-12-09 17:00:24 -08:00
Bob Wilson
810fb6db79 Revert "Do not enforce checks for LLVM's ABI-breaking build settings."
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.
2016-12-07 14:11:18 -08:00
Bob Wilson
c68727c3a6 Merge pull request #6112 from apple/revert-5392-revert-5369-use-local-clang
try again to revert "Make the option of building using the host clang the default"
2016-12-07 09:35:34 -08:00
Bob Wilson
647c1d9424 Revert "Revert "Revert "Make the option of building using the host clang the default""" 2016-12-06 15:36:19 -08:00
EMatejska
e1ce10f34a Bumping the version to Swift 3.1 2016-12-06 13:56:04 -08:00
Bob Wilson
411a05b753 Do not enforce checks for LLVM's ABI-breaking build settings.
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.
2016-12-06 12:24:16 -08:00
Bob Wilson
13da3fa8b1 Merge remote-tracking branch 'origin/master' into master-next 2016-12-04 18:16:09 -08:00
Simon Evans
70e79094e4 Optionally compile libicu
- 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
2016-11-29 13:36:18 +00:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
K Staring
6a121fb6e3 Merge branch 'master' of https://github.com/apple/swift 2016-11-17 21:13:04 +01:00
Bob Wilson
6ca7872ba5 Merge remote-tracking branch 'origin/master' into master-next 2016-11-16 22:12:23 -08:00
Bob Wilson
f10ae47b9f Merge remote-tracking branch 'origin/master' into master-next 2016-11-15 17:32:28 -08:00
Doug Coleman
692bc1c031 cmake: Allow requiring minimum versions using sdk-os-version triples on
Darwin.

Example:
--darwin-sdk-deployment-targets=fookit-ios-8.0;barkit-tvos-9.2
2016-11-15 16:43:37 -08:00
Doug Coleman
2381ebc4e5 build-script-impl: Generate the test commands from cmake and ninja in
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
2016-11-01 11:51:42 -07:00
K Staring
536c1ac6ce Merge branch 'master' of https://github.com/apple/swift 2016-10-31 07:10:16 +01:00
Bob Wilson
b227f45b7e Merge remote-tracking branch 'origin/master' into master-next 2016-10-27 22:28:28 -07:00
karwa
e665611514 Change Linux/ARM triples. Previous values were not valid (#5460)
Resolves https://bugs.swift.org/browse/SR-3019.
2016-10-25 17:51:29 -07:00
K Staring
134bd2e962 don't hard-force ld.gold as per @jrose-apple 's suggestion 2016-10-25 22:07:49 +02:00
Todd Fiala
871668b1a9 add --lldb-test-swift-only flag to build script
This flag will be used by Swift PR checking to run just the
portion of the LLDB test suite that is specific to Swift.
2016-10-25 09:54:45 -07:00
Doug Coleman
ac15eaee98 Merge pull request #5389 from erg/build-script-impl-flag
build-script-impl: Add a flag for SourceKit to skip install pass under some conditions
2016-10-21 14:00:27 -07:00
Bob Wilson
ecbe315280 Revert "Revert "Make the option of building using the host clang the default"" 2016-10-20 18:01:33 -07:00
Doug Coleman
dc40d54d55 build-script-impl: Add a flag for SourceKit to skip install pass if
they are cross-compiling and the host platform equals the local
platform.
2016-10-20 16:56:45 -07:00
Michael Gottesman
1ef15296f6 Merge pull request #5369 from bob-wilson/use-local-clang
Revert "Make the option of building using the host clang the default"
2016-10-20 16:37:04 -07:00
Doug Coleman
c09a7487f4 Merge pull request #5387 from erg/revert-build-script-impl-xcompile
Revert "[build-script] When cross compiling tools, don't install nati…
2016-10-20 15:55:57 -07:00
Doug Coleman
3819809019 Revert "[build-script] When cross compiling tools, don't install native host tools."
This reverts commit f03ec5016d.

@karwa depends on this behavior for a script.
2016-10-20 14:41:18 -07:00
Michael Gottesman
c4c55969c1 Fix testing when distcc is enabled.
DaveA recently improved how we handle distcc with
880bd30286. Sadly this commit hit a landmine bug
created by a hack. Specifically there is some sort of code that is attempting to
sed ninja output (I don't completely understand what it is doing). My fix here
unblocks testing with distcc by just not using the hack when compiling with
distcc-pump.

I filed rdar://28874166 to investigate this issue.
2016-10-20 11:50:58 -07:00
Dave Abrahams
ce8295f89f [distcc-support] Improve consistency, refactoring
* CMake deduces the path to some tools (ld, nm, objdump, ranlib, and
  strip) from the path to the compiler.  When the compiler is distcc, it
  picks up the generic paths in /usr/bin instead of the one in the Xcode
  being used, so set them explicitly in that case.

* Factor out the distcc command goop to be used for all cmake --build
  invocations.
2016-10-19 18:26:32 -07:00
Bob Wilson
d49200fa3e Revert "Make the option of building using the host clang the default"
This reverts commit 0b1e8583a1.

No one remembers what problems this caused for the ASan bot when we
tried building the runtime with the just-built clang, so I'm reenabling
it now and we'll see what happens.
2016-10-19 14:31:32 -07:00
Todd Fiala
7213a4d825 fixup header symlink issue due to clang 3.8 assumption
The master-next branch brought in clang 4.0 in a recent merge.
Fix the CI that is breaking when trying to link in the 3.8-specific
headers.
2016-10-18 15:41:11 -07:00
Doug Coleman
f03ec5016d [build-script] When cross compiling tools, don't install native host tools. 2016-10-18 13:38:14 -07:00
Bob Wilson
b9d1b49c33 Temporarily disable llvm modules.
Clang-800 is crashing with C++ modules when building this version of LLVM.
Hopefully we can find a workaround. The crash is tracked
in rdar://problem/28739039
2016-10-13 10:41:48 -07:00
adrian-prantl
fd47f925a7 Merge pull request #5186 from adrian-prantl/28655564
build-script: Don't automatically clear the module cache.
2016-10-11 10:04:06 -07:00
Adrian Prantl
65ad63730d build-script: Don't automatically clear the module cache.
On Darwin, LLVM builds with -gmodules which causes debug info for the
types defined by the LLVM modules is stored alongside the modules in the
module cache. Deleting the module cache on every re-invocation of
build-script without re-building the LLVM and clang modules will erase
the debug info and thus render any LLVM types undebuggable.

rdar://problem/28655564
2016-10-07 15:32:46 -07:00
Michael Gottesman
0c88392f31 [build-script] Always set -DNDEBUG when overriding CMAKE_{C,CXX}_FLAGS_RELWITHDEBINFO for swift and llvm.
Turns out -DLLVM_ENABLE_ASSERTIONS does not actually enable assertions in LLVM!
What it actually does is rewrite the -DNDEBUG flag to be -UNDEBUG. This means
that we always want to pass in -DNDEBUG to swift. There are some complications
though. This means that we can not compile the C++ part of the runtime with a
different assertions setting than the swift compiler/llvm. This is a trade off
that for now we are ok with to get the no-asserts build working.

As part of a separate change, we are going to make -DLLVM_ENABLE_ASSERTIONS more
robust by doing what swift does now, putting -DNDEBUG or -UNDEBUG after CMake's
-DNDEBUG so we get the correct behavior of disabling or enabling assertions.

rdar://28485525
2016-10-05 15:10:22 -07:00
Michael Gottesman
1334f88d03 [build-script] Only hard code the C/CXX flags for RelWithDebInfo builds.
This patch resolves some post-commit feedback from @llvmbeanz. Specifically, the
only time that we need to hard code these flags are when compiling with
RelWithDebInfo since we need extra control in that case to ensure that CMake
does not sneak in a -g flag on the command line. This is important to ensure
that we are compiling with -gline-tables-only instead of -g.

Given that it is a performance fix specific to compiling with LTO with debug
info, we should no perform such a change when compiling with:

1. MINRELSIZE since we do not ever perform that build.
2. RELEASE since it does not have debug info.
3. DEBUG since why would one perform an LTO build in DEBUG mode.

In terms of 3, I can potentially imagine someone trying to compile Swift in
Debug with LTO to try to debug an LTO bug, but I imagine such a test case to be
such a rare need that there is no point in trying to make it faster.
2016-10-05 15:10:18 -07:00
swift-ci
ab32802bc7 Merge pull request #4903 from keith/ks/build-bracket 2016-09-25 17:59:47 -07:00