Commit Graph

864 Commits

Author SHA1 Message Date
Michael Gottesman
a1cf6d34cd [swift_build_support] Add support for building benchmarks on linux-x86_64.
I put in a small little kludge to add support for this. The better solution is
to refactor the supports_benchmark property from Platform to Target. We
already have a similar abstraction problem with armv7 target on Darwin, where we
explicitly turn off benchmarking.

*NOTE* Building the benchmarks for linux still requires more cmake work. I am
making some changes in a subsequent commit series to do this. If you try to
compile the benchmarks, you will hit an error where ninja says that it doesn't
know about the swift-benchmark-linux-x86_64 target.
2017-03-05 13:04:44 -08:00
Hugh Bellamy
e0371696a9 Add clang-cl to list of possible C/C++ compilers for Windows 2017-03-02 19:32:28 +07:00
Hugh Bellamy
12ae9b4630 Add Windows target and toolchain 2017-03-02 19:28:21 +07:00
practicalswift
1e0e3f26ef [gardening] Fix trailing whitespace 2017-02-28 17:15:58 +01:00
Doug Coleman
d52d52fdf7 Merge pull request #7711 from hughbe/error-message-build-script
Improve the error message for an unsupported system or architecture in build-script
2017-02-24 11:03:16 -08:00
Doug Coleman
c6f29c81b3 Merge pull request #7712 from hughbe/build-script-impl-source-dir
Fix and cleanup build-script product source discovery
2017-02-24 10:59:01 -08:00
Hugh Bellamy
409a214f85 Fix build-script shell to work on Windows 2017-02-24 10:57:47 +07:00
Hugh Bellamy
83795ecd06 Fix source code paths of corelibs products in build-sciript
We previously assumed the source_dir was just `xctest` or `foundation`
or `libdispatch`, without the `swift-corelibs` prefix
2017-02-24 08:17:03 +07:00
Hugh Bellamy
00b8913efa Fix mismatching path to ICU source in build-script and build-script-impl
build-script-impl assumes ICU is located at
```
LIBICU_SOURCE_DIR="${WORKSPACE}/icu"
```

However, build-script would try to set it to
```
<path-to-workspace>/libicu"
```

This is wrong, so fix it
2017-02-24 08:17:02 +07:00
Hugh Bellamy
184b6394f0 Improve the error message for a platform without a Toolchain 2017-02-23 19:39:33 +07:00
Hugh Bellamy
8943ad6cc4 Improve the error message for an unsupported system or architecture in build-script 2017-02-23 19:33:58 +07:00
Hugh Bellamy
4f23d61da0 Import print_function wherever we use print() in python code 2017-02-20 11:11:27 +07:00
Hugh Bellamy
fa3543d3c5 Fix some pylint errors for double whitespace after class/function 2017-02-17 15:37:19 +07:00
David Farler
76dd2a5185 Match cmark build type with swift by default
Some cmark CMake stuff changed recently and the default rules
we have in the Python build script code doesn't behave correctly
anymore, likely because it was relying on incorrect settings.

Now, by default, if the cmark build type isn't specified, it will
follow Swift's. If we don't do this, Xcode builds are broken, and
building with Xcode is important.
2017-02-10 16:47:01 -08:00
Doug Coleman
480e0d785b build-script: Allowing passing of libtool path to llvm. 2017-02-08 19:42:10 -07:00
Doug Coleman
9d0d533723 cmake/build-script: Allow passing a lipo path instead of finding it from
Xcode.
2017-02-07 03:31:09 -07:00
Michael Gottesman
fee2db81de [cmake] Add a new option called SWIFT_FORCE_OPTIMIZED_TYPECHECKER that forces Sema to be built optimized.
This should help speed up people trying to compile the standard library and do
SILGen work. *NOTE* This will not necessarily result in a type checker that is
as fast as a release build since most likely the type checker will use some
link_once odr functions that are debug. But it should still be significantly
faster otherwise.

This makes getting to SILGen take 16 seconds on my machine instead of forever
when compiling with everything else in the compiler in debug mode.
2017-02-05 16:48:54 -08:00
practicalswift
92ccc44b3a [gardening] Fix recently introduced PEP-8 deviations 2017-01-22 22:02:33 +01:00
Bob Wilson
34514513fd Merge remote-tracking branch 'origin/master' into master-next 2017-01-15 17:34:17 -08:00
Doug Coleman
1f0baffb93 utils/.../ninja.py: Support CXX for ninja builds on Linux.
Without this fix, on Linux, passing --build-ninja looks for g++
and fails to build on the CI.
2017-01-12 16:15:58 -08:00
Bob Wilson
37e7d1c627 Merge remote-tracking branch 'origin/master' into master-next 2017-01-08 17:07:46 -08:00
practicalswift
4a50e7ba9f [gardening] PEP-8 fixes 2017-01-07 21:09:49 +01:00
practicalswift
8c2b87bce0 [gardening] Add correct copyright notices 2017-01-07 20:32:18 +01:00
practicalswift
67d56d7dbf [gardening] Remove unused variable allow_non_zero_exit 2017-01-06 16:43:40 +01:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Doug Coleman
8526d16c0b utils: If shell.run_parallel is not called before run.shell(), then the
lock is not initialized. Thus, we initialize the lock to None and just
don't use it because no console output can happen in parallel because
we're not running in parallel.
2017-01-05 17:26:49 -08:00
Bob Wilson
4ca0676a34 Merge remote-tracking branch 'origin/master' into master-next 2017-01-05 17:11:16 -08:00
swift-ci
6c6aa94a8c Merge pull request #6575 from gottesmm/bug_reducer_tester_fin 2017-01-04 17:07:50 -08:00
Michael Gottesman
d81be870bc [semantic-sil] When compiling with sil ownership disabled, explicitly disable it.
Otherwise, when one switches from compiling with a semantic sil enabled build to
a normal build, one is still compiling with semantic-sil enabled.
2017-01-04 15:21:30 -08:00
Doug Coleman
3753f59f52 utils: Make update-checkout run in parallel. 2017-01-04 14:23:22 -08:00
Bob Wilson
78b28243ff Merge remote-tracking branch 'origin/master' into master-next 2017-01-03 14:22:59 -08:00
Doug Coleman
53d1649e8c Merge pull request #6078 from erg/use-toolchain-ninja
swift_build_support: If we are using the Ninja generator and we have …
2016-12-14 13:09:28 -08:00
Doug Coleman
51543db9e1 swift_build_support: If we are using the Ninja generator and we have found a toolchain.ninja, use that ninja.
If ninja is installed, treat it as a path to ninja anyway.
2016-12-14 11:44:01 -08:00
Bob Wilson
deddf19aae Merge remote-tracking branch 'origin/master' into master-next 2016-12-13 10:23:03 -08:00
Vivian Kong
63cd78ba99 Fix for ToolchainTestCase failure on non-FreeBSD systems 2016-12-12 12:36:40 -05:00
practicalswift
b2af4653e4 [gardening] Fix PEP-8 violations. 2016-12-08 18:47:24 +01:00
Michael Gottesman
a9f737c7c7 [swift_build_support] Always emit a compilation_db.
There is no reason not to do this (and it is really cheap) and I want to make
some scripts use it with various clang tooling techniques like clang-tidy to
improve code quality. This will ensure that by default people can just use these
scripts without knowing about how things are working under the hood.
2016-12-06 17:34:21 -08:00
Michael Gottesman
50fa0d35c4 Add ./utils/swift_build_support/test_swift_build_support.sh to test swift_build_support.
I always forget the exact python invocation to run this test and I am sure
others do as well... so why not just write a script that always remembers it?
2016-12-06 17:22:01 -08:00
Bob Wilson
13da3fa8b1 Merge remote-tracking branch 'origin/master' into master-next 2016-12-04 18:16:09 -08:00
practicalswift
568a3e46ba [gardening] Improve header consistency. 2016-12-02 01:47:38 +01: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
Bob Wilson
f10ae47b9f Merge remote-tracking branch 'origin/master' into master-next 2016-11-15 17:32:28 -08:00
Michael Gottesman
857b764730 Add support for creating a compilation db for swift to build-script. 2016-11-11 13:28:30 -08:00
Bob Wilson
b227f45b7e Merge remote-tracking branch 'origin/master' into master-next 2016-10-27 22:28:28 -07:00
vitalyster
395fe061fd swift_build_support: do not raise exception when capturing shell with… (#5380)
* swift_build_support: do not raise exception when capturing shell with optional flag

This fixes one of https://bugs.swift.org/browse/SR-2966 failed tests when testing environment trying to instantiate FreeBSD toolchain on Linux and `sysctl` is not in the PATH

* swift_build_support: fix shell test
2016-10-20 15:29:01 -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
Michael Gottesman
b16d4fa505 [semantic-arc] Add build-script option --enable-sil-ownership to turn on the SIL ownership model.
rdar://28685236
2016-10-11 11:29:12 -07:00
practicalswift
ce3b47e329 [gardening] PEP-8 fixes. 2016-09-25 20:41:55 +02:00
Michael Gottesman
6fd9dca2e6 [benchmark] Allow the number of test samples cmake will use to be specified from the command line.
The benchmark bot uses this functionality today to run the benchmarks. By
default build-script only uses 3 samples for each test. Given the noise on our
systems, this is definitely not sufficient for any sort of robust numbers.

Using this patch, I am going to change the benchmarking bot to take the minimum
of 20 samples as we do for our internal benchmarking. This should help make the
benchmark bot give better data. This will have as a cost cause the bot to take
more time. The testing time issue can be solved down the line by changing to a
protocol where we first do tests with a small number of samples (< 5). Then any
benchmark with a delta > 5% is rerun with 20 samples or perhaps until a
statistical criterion is satisfied. But until that is implemented, this at least
makes the bot useful.

There are other things that need to be changed on the benchmarking bot as well,
namely that it should build on a separate machine from which it is running the
benchmarks on. The benchmarking machine should be quiet and not have any work
being done on it. But that is also for another time.
2016-09-23 20:05:10 -07:00