Commit Graph

193 Commits

Author SHA1 Message Date
Harlan Haskins
a41ec1a6f7 [coverage] Cleaned up argument parsing for swift coverage, and hooked into build-script to propagate the different values 2016-01-25 19:49:03 -08:00
Harlan Haskins
eb27ca1e2e [coverage] Initial commit of profdata merging worker 2016-01-25 19:49:03 -08:00
Brian Gesiak
c1a746bc92 [build-script] There can only be one host target
`build-script-impl` currently maintains a list of
`NATIVE_TOOLS_DEPLOYMENT_TARGETS` -- host machine targets, for which
the resulting binaries can be run on the current machine.

However, there is only ever *one* host machine. This commit:

- Changes the `NATIVE_TOOLS_DEPLOYMENT_TARGETS` list parameter into a
  single string parameter, `HOST_TARGET`.
- Promotes the logic to detect the host target to Python, and places it
  in the `swift_build_support` module.
- Removes the hard-coded "macosx_x86_64" path to the LLVM and Clang
  TableGen -- thereby unblocking future work to make cross-compilation
  possible on platforms other than OS X.
- Also promotes cross-compilation target validation to Python, placing
  it in the `swift_build_support` module.
2016-01-24 11:48:09 -05:00
Erik Eckstein
8b840364ff tab -> space 2016-01-23 14:15:09 -08:00
Erik Eckstein
716d0d7c17 Add a build option to compiler StdlibUnittest with -sil-serialize-all
This is the configurable version of 29214253e5
By default it's off.
2016-01-22 17:12:31 -08:00
David Grove
06860a4d01 Initial integration of libdispatch into build-script
Extend build-script, build-script-impl, and update-checkout
to include libdispatch.  For now, libdispatch is not
built by default (user must enable via command line
argument).

Integration of testing is functional, but should be improved
in a later pull request.  The basic autotools based test
harness does not give the nice high-level progress output
as the rest of the test suite.

A related pull request to libdispatch (#34) has some fixes
to the autotools build that are needed to enable the test
target to succeed when run in an external directory.
2016-01-21 19:22:45 +00:00
Dmitri Gribenko
a74355426e Merge pull request #1008 from modocache/build-script-sil-verify-all
[build-script] Unify naming: `SIL_VERIFY_ALL`
2016-01-20 00:40:15 -08:00
lplarson
534a19117b Merge pull request #997 from lplarson/code-coverage
[CMake] Support code coverage analysis
2016-01-19 20:10:42 -08:00
Dmitri Gribenko
3cf4dd36a1 Update language version to 3.0 2016-01-19 19:59:05 -07:00
Luke Larson
ba619a9ff2 [CMake] Support code coverage analysis 2016-01-19 18:51:07 -08:00
Mishal Shah
61962c4b69 Remove DYLD_LIBRARY_PATH from Swift toolchain Info.plist
rdar://problem/23539092
2016-01-19 11:04:44 -08:00
Brian Gesiak
cad395bf3b [build-script] Unify naming: SWIFT_SIL_VERIFY_ALL
Although the user sets the option using `--sil-verify-all`, various
build scripts refer to the option as `SWIFT_VERIFY_ALL`. Code comments
indicate that this may have been a separate setting at one time.

Remove the misleading comments and unify naming with
`--sil-verify-all` and `SWIFT_SIL_VERIFY_ALL`. This more closely matches what
the option actually does (adds `-Xfrontend -sil-verify-all` to `swiftc`
invocations during the build process).
2016-01-19 11:11:39 -05:00
Anton Blanchard
b1827d8a8f Add powerpc64le Linux support
This patch adds powerpc64le Linux support. While the patch also adds
the matching powerpc64 bits, there are endian issues that need to be
sorted out.

The PowerPC LLVM changes for the swift ABI (eg returning three element
non-homogeneous aggregates) are still in the works, but a simple LLVM
fix to allow those aggregates results in swift passing all but 8
test cases.
2016-01-15 06:48:31 +00:00
Todd Fiala
b6bc2667a9 lldb build: allow optional xcodebuild flags to be passed to build-script-impl 2016-01-14 10:00:50 -08:00
Brian Gesiak
e1312f41ec [build-script] Remove unused function
`is_native_tools_deployment_target` is never used. Remove it.
2016-01-12 16:54:07 -08:00
Dmitri Gribenko
fab6738d22 Merge pull request #937 from smikes/bootstrap-ninja-set-make-program
[build-script-impl][SR-58] When bootstrapping ninja, set CMAKE_MAKE_COMMAND
2016-01-12 08:45:41 -08:00
Sam Mikes
3e4d6c7392 Reduce visibility of variables
NINJA_BIN doesn't have to be exported, so don't export it
PATH doesn't have to be changed, so don't change it
2016-01-12 07:39:34 -07:00
Sam Mikes
6d8b4930c3 [build] When bootstrapping ninja, set CMAKE_MAKE_COMMAND
Works around problem where CMake has already cached the nonexistence
of ninja.

Ref #SR-58 https://bugs.swift.org/browse/SR-58
2016-01-11 06:21:05 -07:00
practicalswift
4689a22f1b Replace left/right quotation marks with apostrophes in non-quote contexts
* LEFT SINGLE QUOTATION MARK (U+2018) → APOSTROPHE (U+0027)
* RIGHT SINGLE QUOTATION MARK (U+2019) → APOSTROPHE (U+0027)
2016-01-06 12:29:40 +01:00
Brian Gesiak
44db638a5c [build-script] Print unknown target
Most other parts of `build-script-impl` print the unknown argument when
a switch statement fails to pattern match. Do the same for unknown
arguments passed to `--cross-compile-tools-deployment-targets`.
2016-01-04 11:52:07 -05:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Brian Gesiak
c65c91d61f [SR-237][build-script] Determine CMake in Python
SR-237 calls for `build-script` and `build-script-impl` to be merged. This
commit takes another step towards that goal by moving the logic that finds
the path to the CMake executable up into `build-script`.

Users of `build-script` were previously able to specify which CMake
they wished to use via `build-script-impl` args, like so:

```
$ utils/build-script -- --cmake=/foo/bar/cmake
```

This commit preserves that behavior, while also allowing users to
specify that path via `build-script` args:

```
$ utils/build-script --cmake=/baz/cmake -- --other --flags
```
2015-12-28 12:37:26 -05:00
Dmitri Gribenko
af8cfbf6d9 Merge pull request #789 from rpinz/master
explicitly curly brace ({}) all variable usage to guarantee proper parameter expansion
2015-12-28 19:20:48 +02:00
Ron Pinz
c97c925db6 explicitly curly brace ({}) all variable usage to guarantee proper parameter expansion 2015-12-27 13:26:52 -05:00
practicalswift
6f5856ff45 Fix two recently introduced typos 2015-12-27 18:59:35 +01:00
Brian Gesiak
ca3e11b2d6 [build-script] Determine HOST_CC in build-script
https://bugs.swift.org/browse/SR-237 calls for `build-script` and
`build-script-impl` to be merged. This commit takes another step towards
that goal by moving the logic that finds the path to the `clang` and
`clang++` executables up into Python-land.

Rather than simply moving all of the logic into `utils/build-script`,
this commit moves relevant functions into a new Python module, named
`swift_build_support`. This has several benefits:

- The logic can be tested. Whereas `build-script-impl` needed to be run
  in order to verify its behavior, the logic extracted out of it into
  `swift_build_support` can be tested in isolation.
- The logic can be split up into several files without polluting the
  `utils` directory, which now contains many different files that are
  unrelated to `build-script`.
2015-12-27 02:35:32 -05:00
Dmitri Gribenko
4a9a6a2056 build-script: fix syntax error in the shell script
Use ${} to expand variables instead of $().
2015-12-24 03:21:22 -08:00
Brian Gesiak
25af095446 [build-script] Do not determine build jobs in impl
Begins work on SR-237.

Rather than determining the number of jobs to use for `make` or
`dsymutil` from within build-script-impl, this change passed in those
values from above.

Furthermore, because we can determine the number of build jobs via a
builtin Python function, we figure out the number of jobs to use from
within `utils/build-script`. Now, by default, the same number of jobs
will be used to build this project as there are cores on the host
machine. Users may still specify a different number, as before, using
the `--jobs` option.

This introduces a behavioral change. Before, running
`utils/build-script` would run something like the following `cmake`
command:

```
cmake --build /build/Ninja-DebugAssert/llvm-macosx-x86_64 -- all
```

Notice the lack of jobs specified. The new default is something like
the following:

```
cmake --build /build/Ninja-DebugAssert/llvm-macosx-x86_64 -- -j8 all
```

Notice that the number of jobs is exlicitly passed to the command.
2015-12-23 23:24:33 -05:00
practicalswift
6e3b700b44 Fix typos. 2015-12-23 00:31:13 +01:00
Dmitri Gribenko
3e6fc7d46d build-script: also look for the ninja binary under the name 'ninja-build' 2015-12-22 11:44:17 -07:00
Dmitri Gribenko
e9a435d77d build-script: allow building a pluggable performance test suite, if requested by a command line flag 2015-12-21 18:17:13 -08:00
Dmitri Gribenko
35ceb6faa8 build-script: replace tabs with spaces 2015-12-21 12:48:28 -07:00
Dmitri Gribenko
0bf708aab8 build-script: allow specifying the compiler version from a preset 2015-12-21 12:48:28 -07:00
Dmitri Gribenko
3bc99c7913 bulid-script: simplify code and use more idiomatic variable names 2015-12-19 21:28:35 -08:00
Dmitri Gribenko
f4c1f4b4a4 Disable SourceKit tests everywhere except OS X
SourceKit tests currently implicitly rely on the OS X standard library.
2015-12-19 18:31:23 -08:00
Dmitri Gribenko
3653e22e0c build-script: use a private sandbox for integration tests
This does not solve all issues, see https://bugs.swift.org/browse/SR-321
2015-12-19 18:15:15 -07:00
practicalswift
36ac5ec220 Use $(cmd) instead of discouraged cmd. 2015-12-19 20:12:11 +01:00
practicalswift
95de256761 Remove superfluous echo. 2015-12-19 20:10:23 +01:00
practicalswift
9a80e859f9 Remove unused variables. 2015-12-19 20:09:29 +01:00
Dmitri Gribenko
8e738c3126 build-script: allow to skip running SourceKit tests 2015-12-18 18:54:26 -08:00
Dmitri Gribenko
dffae4ed71 build-script: pass down the xcrun toolchain name to CMake, and to lit 2015-12-18 01:52:29 -08:00
Todd Fiala
c0c08aa58f LLDB: enable rerunning of load-sensitive tests in a low-load follow-up test pass 2015-12-16 17:04:36 -08:00
Mishal Awadah
811bdb4624 [build-script] Rename package-tests to integration-tests. 2015-12-16 13:27:30 -08:00
Mishal Awadah
41fe7910b2 [build-script] Log foundation testing steps like other targets do. 2015-12-15 11:47:10 -08:00
Davide Italiano
922114ce8f [build] Fix FreeBSD amd64 build after recent changes. 2015-12-14 23:19:39 +00:00
Dmitri Gribenko
cf97acc67d Merge pull request #529 from modocache/export-compile-commands
[build-script] Add flag to export compile commands
2015-12-13 20:15:21 -08:00
Brian Gesiak
adf6fef8d2 [build-script] Add flag to export compile commands
CMake supports generation of compilation databases. These have many uses, not
least of which is in supporting code-completion engines like
https://github.com/Valloric/YouCompleteMe.

Add the `--export-compile-commands` flag to `utils/build-script`.
Setting this flag passes `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to CMake,
which results in a `compile_commands.json` file being generated along
with built products like `cmark`, `llvm`, and `swift`.
2015-12-13 23:04:43 -05:00
Dmitri Gribenko
15be903fe2 Merge pull request #500 from practicalswift/fix-typos-4
Fix typos (4 of 30)
2015-12-13 16:21:02 -08:00
Dmitri Gribenko
83751888c7 Start porting Swift to Linux on aarch64 (arm64)
Hello world works, a non-trivial part of the testsuite passes.
2015-12-13 17:05:42 -07:00
Dmitri Gribenko
ebcc23d4d1 build-script: try harder to detect outdated cmark repository 2015-12-14 01:22:48 +02:00