Commit Graph

193 Commits

Author SHA1 Message Date
Ross Bayer
5a8a25e59e [build-script] Argument Builder DSL Conversion: Episode 3 (#13231)
* Updated the PathType and StorePathAction classes to allow for asserting if a path contains an executable.

* Converted the top-level argument group to use the new builder DSL.

* Updated tests for StorePathType to not actually test the functionality of the PathType class.

* Implemented a CompilerVersion type to mimic the existing wrapper in swift_build_support and return a more detailed object from ClangVersionType and SwiftVersionType.

* Updated action tests.

* Fixed a filter() mistake.

* Code review.
2017-12-06 12:36:48 -08:00
Ross Bayer
d1620f509e Updated argument parsing code to use a new OnOffAction with Enable and Disable variants, properly handling optional boolean arguments and inverting the state for disabled options. Previously when an option such as '--skip-build-benchmarks' was passed with a boolean the destination would take on the value without inverting the state, which was causing some build configuration errors. (#12005) 2017-09-29 12:06:51 -07:00
Calvin Hill
aee81d272f Add Initial platform support for Haiku. (#11583) 2017-09-22 21:06:56 -04:00
Ross Bayer
ef7c951949 Affirmative names for argument parsing namespace destinations. (#11952)
* Added new OptionalTrueAction and OptionalFalseAction classes to the arguments module.

* Fixed missing return statement in help-test generator.

* Renamed all the `skip_build_*` names to the more simple and affirmative `build_*`.

* Renamed all the `skip_test_*` names to the more simple and affirmative `test_*`.

* Added documentation to the OptionalTrueAction and OptionalFalseAction classes.
2017-09-15 16:21:38 -07:00
Mishal Shah
6d2487d6d1 Add support to skip 32bit iOS simulator tests 2017-06-28 00:18:09 -07:00
Hugh Bellamy
ae402c7584 Merge pull request #10490 from hughbe/master
Update update-checkout on Windows
2017-06-24 11:16:31 +07:00
swift-ci
1a6ed0ac8a Merge pull request #10504 from gottesmm/lsan_linux_bot 2017-06-22 13:24:18 -07:00
Michael Gottesman
aa4e2dac2c [build-script] Add support for compiling swift with leaks sanitizer.
This only enables the swift compiler (not its output) to be used with leaks
sanitizer on linux.

Some important notes: On Linux, right now we are not completely leak clean. I
was only able to get a -Onone build of the stdlib without triggering lsan (I was
unable to run the optimizer and the tests successfully). Additionally even at
-Onone, I had to suppress some leaks in the driver. The point of this though is
to prevent any further -Onone leaks from being committed to the tree since
-Onone leaks that are not bounded (unlike the driver bugs) could cause SourceKit
to leak memory. Since SourceKit is a long running process... such a type of leak
would be bad.

rdar://32876901
2017-06-22 12:52:12 -07:00
Hugh Bellamy
35a778ef2c Fix Windows python errors in SwiftBuildSupport 2017-06-22 15:11:23 +07:00
Mishal Shah
c5ff1f2cac Update master to build with Xcode 9 beta 1, OS X 10.13, iOS 11, tvOS 11, and watchOS 4 SDKs. 2017-06-14 16:20:35 -07:00
Doug Coleman
053f71c7f1 utils: Fix python import path round two. 2017-04-07 11:56:21 -07:00
Mishal Shah
f1c3629246 Revert "python: Fix nosetests tests." 2017-04-06 18:51:50 -07:00
Doug Coleman
c0b7918099 python: Fix nosetests tests.
Why are the python reasons for having our code nested in a directory
called ``swift_build_support.swift_build_support/`` instead of simply
``swift_build_support/``? Is that what we really want here?
2017-04-06 17:47:09 -07:00
Hugh Bellamy
36645a0976 Address FIXMES for cleaning up imports in build-script and friends 2017-04-01 09:54:01 +07:00
Hugh Bellamy
aa70ea8fdd Remove a 9 from overly high timeouts 2017-03-31 09:58:39 +07:00
Doug Coleman
3d08b49dae utils: python lint fixes. 2017-03-30 16:32:13 -07:00
Jacob Mizraji
2647ca2f84 Pass CLANG_VERSION_* cmake flags to the LLVM build.
In a normal swiftless clang build, if it doesnt know CLANG_VERSION_*,
clang's cmake falls back on LLVM_VERSION_*. We pass a CLANG_COMPILER_VERSION
to swift, but it is not necessarily what clang wants to know.

The intention of this CLANG_VERSION_* flag in Clang is to know
what Swift calls clang_user_visible_version. This is the non-specific
version of Clang. For example, clang-900 - this is 9.0.0, while Swift
would like clang_compiler_version to be the specific version that the
driver will print out.

Flag naming!

Fix tests
2017-03-29 15:57:06 -07:00
Hugh Bellamy
ad4b338062 Fix python lint failures now not excluded as we provide custom exclusions
Looks like flake8 enables other rules when you add something to the
exclusion list. We added W291
2017-03-27 12:31:56 +07:00
Michael Gottesman
912a162e57 [build-script] Give ubsan, tsan the same treatment I gave asan in 824ffa6857. 2017-03-26 20:07:14 -07:00
Hugh Bellamy
8671854674 Properly python lint remaining files 2017-03-23 14:06:46 +07:00
Doug Coleman
e7390d1770 Revert "utils: Add swiftenvs, which allow the overriding of compiler tools."
This reverts commit 2b923f3846.
2017-03-22 20:09:34 -07:00
Doug Coleman
e480227d82 Revert "swiftenv-script: Fix some issues with swiftenvs." 2017-03-22 17:00:21 -07:00
Doug Coleman
351a515f6c swiftenv-script: Bug fixes for swiftenv.
Fix the mocked output files of swiftc. Change the lookup of
clang from build-script to build-script-impl like all the other
commands. Pass more args to LLVM. Fix swiftenv creation. Fix unit tests.

The reason this patch works is that build-script-impl gets
all the arguments that are not handled by build-script.
2017-03-22 12:47:33 -07:00
Doug Coleman
2b923f3846 utils: Add swiftenvs, which allow the overriding of compiler tools. 2017-03-21 14:59:12 -07:00
Mishal Shah
dd9c81c965 Revert "Integrate python-lint into validation tests" 2017-03-21 12:24:46 -07:00
Hugh Bellamy
639c0beec7 Get python-lint build clean 2017-03-21 20:21:43 +07:00
Michael Gottesman
824ffa6857 [build-script] When building with asan, mangle asan into the build subdirectory name.
Today, when you enable ASAN, build-script just reconfigures your normal build
directory to use ASAN. This forces you to recompile LLVM and Swift with ASAN
enabled and then (once you have finished using ASAN) to recompile LLVm/Swift
without ASAN.

By using a different build-directory, one still has to (potentially) recompile
LLVM/Swift, but one's original directory has not become invalidated. Thus when
you switch back to a normal build, one does not have to recompile LLVM and
(potentially) Swift!
2017-03-17 18:44:48 -07:00
Ben Langmuir
da4d084458 Revert "[build-script-impl] Add support for building benchmarks on linux but disable it in all currently defined presets for linux." 2017-03-06 08:50:04 -08:00
swift-ci
031ecc2b57 Merge pull request #7860 from gottesmm/build_script_impl_linux_benchmarks 2017-03-05 13:30:59 -08:00
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