Commit Graph

581 Commits

Author SHA1 Message Date
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
Michael Gottesman
e4d8cc7a4d [build-script-impl] Always add debug info flags from build-script for LLVM and use it to ensure that -gline-tables-only is the only debug flag passed in when compiling with LTO.
rdar://27973141
2016-09-25 15:43:04 -07:00
Luke Larson
0c3c02bdbd [build-script] Add clang PGO support 2016-09-23 14:22:37 -07:00
Keith Smiley
731e58a3ab Remove extra closing bracket from build script
This resulted in a bad substitution when running

swift/utils/build-script --swiftpm --llbuild
2016-09-21 13:54:20 -04:00
Grzegorz Miłoś
f96b655a89 Merge remote-tracking branch 'upstream/master' into SR-755-linux-fatal-stacktrace-symbolication 2016-09-20 18:24:04 +01:00
Todd Fiala
1f2843cb89 Merge pull request #4871 from tfiala/lldb-macos-run-gtests
run LLDB gtests on macOS via the Xcode build
2016-09-19 23:43:16 -07:00
Todd Fiala
a3e11c36a0 run LLDB gtests on macOS via the Xcode build
This change introduces a helper function to construct the
LLDB Xcode options that are now used in two different locations.
On macOS Xcode builds, it builds and runs the lldb-gtest scheme
in the LLDB workspace.  This step will fail the lldb test phase
if any of the gtests fail to compile or generate a test failure.
2016-09-19 15:37:48 -07:00
Vedant Kumar
61af28b6fe build-script: Disable llvm module builds when asan is enabled
Apparently some sanitizer flags aren't properly encoded in module
hashes. This leads to a crash in the frontend.

rdar://problem/28356072
2016-09-19 10:10:49 -07:00
Vedant Kumar
208e82f66f Merge pull request #4779 from vedantk/modules
build-script: Enable module builds of llvm by default
2016-09-15 13:31:30 -07:00
Grzegorz Miłoś
74ff4dad81 Merge remote-tracking branch 'upstream/master' into SR-755-linux-fatal-stacktrace-symbolication 2016-09-15 14:17:15 +01:00
Luke Larson
573a58cacd [coverage] Add scripts supporting specific coverage
The three included Python scripts work together to generate a sqlite3
database containing mappings of all covered Swift source code regions to
the specific tests that cover them.

Additionally, build-script support is included for utilizing the
coverage database to prioritize tests covering changes in the Swift
repository.
2016-09-14 15:14:01 -07:00
Vedant Kumar
30c2169a5d build-script: Enable module builds by default 2016-09-14 14:22:02 -07:00
Grzegorz Miłoś
e819ae9779 Fix bash PRODUCT enumeration, this makes test run OK. 2016-09-14 16:54:58 +01:00
Michael Gottesman
31195798a7 Merge remote-tracking branch 'origin/master-next' 2016-09-11 02:27:16 -07:00
Grzegorz Miłoś
0600c64398 Review comments. Round 7. Look away please. 2016-09-08 17:52:02 +01:00
Arthur
b29fbeae51 [build] Fix incorrect path quoting in build-script 2016-09-08 16:43:04 +02:00
Grzegorz Miłoś
d10146592d Review comments. Round 5. Integration test for symbolicate-linux-fatal. 2016-09-08 15:01:25 +01:00
Michael Gottesman
b48b4d96fe Merge remote-tracking branch 'origin/master' into master-next 2016-09-07 15:35:07 -07:00
Todd Fiala
7cdab0b843 Merge pull request #4574 from karwa/lldb-cross
[build-script] LLDB cross-compiling
2016-09-06 22:43:46 -07:00
Michael Gottesman
8f4bf953ed Merge pull request #4577 from dgrove-oss/libdispatch-verbose-failing-test
send detailed log for failing libdispatch test to stdout
2016-09-02 08:18:03 -07:00
David Grove
5327fe9c1a send detailed log for failing libdispatch test to stdout
If VERBOSE is set, the automake test harness used by libdispatch
will cat the log file for any failing testcase to stdout. This will
enable the detailed output from the failed test cases to be captured
by the CI system in the console log, enabling better test failure
diagnosis.
2016-08-31 18:19:49 -04:00
Greg Parker
b751eb4ab0 [build-script] Fix build args passed to cmake commands that run tests. 2016-08-31 14:55:33 -07:00
SpringsUp
5bca476763 [build-script] LLDB cross-compiling 2016-08-31 21:46:48 +02:00
Michael Gottesman
fa1bb95923 Merge remote-tracking branch 'origin/master' into master-next 2016-08-30 19:50:12 -07:00
Michael Gottesman
cdc6530f52 [build-script] Remove dead code. NFC. 2016-08-29 21:51:02 -07:00
Tony Parker
59a7c7397a Merge pull request #4203 from phausler/build_libdispatch_by_default
build libdispatch by default in both linux build bot configurations
2016-08-19 22:38:48 -07:00
Philippe Hausler
3951bf8387 Remove logging call to which on autoreconf 2016-08-19 14:31:52 -07:00
Philippe Hausler
f131f827ab Add logging diagnostics to nail down the build script failures 2016-08-19 11:17:39 -07:00
Philippe Hausler
0ca01e14be reconfigure libdispatch when asked to by the build script 2016-08-19 10:58:18 -07:00
Michael Gottesman
4aad5801c8 [vacation/gardening] Move clang/swift version specification from build-script-impl => swift_build_support.products. 2016-08-12 10:07:20 -04:00
Michael Gottesman
72603eb944 [vacation/gardening] Move compiler-vendor code from build-script-impl => swift_build_support.products.
This is part of an effort to provide examples on how to migrate product
specific flags from build-script-impl => swift_build_support.products.
2016-08-12 10:07:20 -04:00