Commit Graph

4111 Commits

Author SHA1 Message Date
Michael Gottesman
115f7a43e0 Move build_script_helper from ./benchmarks/utils => ./benchmarks/scripts. 2019-04-10 22:18:50 -07:00
Davide Italiano
5b5041ddb0 [build-script] Fix defaults and unittests. 2019-04-10 15:01:07 -07:00
Davide Italiano
5dec537173 [lldb] Switch PR testing and build to use CMake by default. 2019-04-10 15:01:07 -07:00
Daniel Rodríguez Troitiño
5f3c2bf3ce [build-script] Split execute_one_impl_action.
execute_one_impl_action is checking for the validity of its arguments, when it
can be enforced by the structure by using smaller focused methods that trickle
down into a common function.

This structure will eventually allow different builders to participate in a
script invocation. Each builder will be told to build/test/install, and they
will not have to deal with anything else. The content of these smaller methods
will end up as part of the builder that uses build-script-impl.
2019-04-09 17:22:43 -07:00
Daniel Rodríguez Troitiño
536a19a1ec [build-script] Move parts of BuildScriptInvocation into HostSpecificConfiguration.
The calculation of the plaforms to build/test were only used by HostSpeficicConfiguration, but were done in BuildScriptInvocation, and to make things work, the full BuildScriptInvocation object was passed down onto HostSpecificConfiguration. The changes in this commit move the code into HostSpecificConfiguration, and only pass `args` into it to let itself calculate the platforms to build/test.

This will allow in the future that HostSpecificConfiguration can to be removed from the main script file, can be tested and can be used by several parts of the build script process. During a transition period, it will be useful for the builder that delegates to build-script-impl, but in the end, it might only be useful for the Swift builder.
2019-04-09 16:23:30 -07:00
Daniel Rodríguez Troitiño
8cf291dd51 Merge pull request #23865 from drodriguez/build-script-host-specific-configuration-take-1
[build-script] Move some calculations into independent methods.
2019-04-09 14:43:03 -07:00
Saleem Abdulrasool
2bfe983e81 Windows: add an entry for AccCtrl.h
This adjusts the SDK VFS to repair the build on case sensitive file
systems.
2019-04-09 10:44:36 -07:00
Saleem Abdulrasool
c2107abbe1 Merge pull request #23871 from drodriguez/build-script-rename-build-methods
[build-script] Rename all do_* methods to simply *.
2019-04-09 10:40:37 -07:00
Daniel Rodríguez Troitiño
a8297b84bd [build-script] Rename all do_* methods to simply *.
As proposed in #23822, the do_* methods should only be using the * parts. Because all building should have the same names, this commit removes the prefix from all the method instances.
2019-04-08 15:51:27 -07:00
Saleem Abdulrasool
5911a73801 build: do not reset DOTEST_EXTRA
We were clobbering the existing flags when appending breaking the staging route.
2019-04-08 15:13:31 -07:00
Daniel Rodríguez Troitiño
394bd9e277 [build-script] Move some calculations into independent methods.
Move the calculations of platforms_to_skip_build, platforms_to_skip_test, platforms_archs_to_skip_test, and platforms_to_skip_test_host to their own independent functions. Each function deal with one of them and they are pure functions, which should improve readability a little.
2019-04-08 11:36:36 -07:00
Saleem Abdulrasool
bc9c79a080 Revert "[build-script] Move HostSpecificConfiguration out of main script."
This reverts commit b9e17a7656.

Unfortunately, this caused conflicts on the Apple internal CI.
Reverting this for now.  This can be split up into smaller patches to
make it easier to merge.
2019-04-08 10:40:59 -07:00
Saleem Abdulrasool
9fb7fc0d60 Merge pull request #23810 from drodriguez/build-script-move-host-specific-configuration
[build-script] Move HostSpecificConfiguration out of main script.
2019-04-08 08:33:38 -07:00
Michael Gottesman
6a14f2e9fe Merge pull request #23849 from gottesmm/build-script-linux-swiftpm
[benchmarks] Add support for building the benchmarks via build-script…
2019-04-07 15:33:24 -07:00
Michael Gottesman
df539948d5 [benchmarks] Add support for building the benchmarks via build-script against the just created toolchain.
Now one can on Darwin/Linux build the benchmarks via swiftpm from build-script by passing in:

```
build-script $NORMAL_ARGS --install-swift --install-swiftpm --install-llbuild --toolchain-benchmarks --swiftpm --llbuild
```

This is done using the infrastructure that BenL added for sourcekit-lsp.
2019-04-07 13:25:31 -07:00
swift-ci
d704a7a6d9 Merge pull request #23842 from xiaobai/better_defaults 2019-04-07 13:07:47 -07:00
Saleem Abdulrasool
e0f79dcba2 Merge pull request #23829 from drodriguez/path-sanitizing-filecheck-yaml-compatibility
[utils][test] PathSanitizingFileCheck more compatible with Windows.
2019-04-06 21:06:43 -07:00
Alex Langford
2d1c2be8c1 [build-script] Add to default LLDB CMake variables on MacOS
LLDB's CMake build forces these values when building on MacOS. It seems
saner to me to set them in build-script than to force them in the CMake
configuration.
2019-04-06 17:21:13 -07:00
Daniel Rodríguez Troitiño
267e0fc70e [utils][test] PathSanitizingFileCheck more compatible with Windows.
In pch-bridging-header-deps test, the PathSanitizingFileCheck is used to
check against YAML escaped paths. This works for Unix paths, since the
slash doesn't need to be escaped, but doesn't work for Windows paths,
because the path separator is escaped, and the replacement done by
PathSanitizingFileCheck only looks for exact matches.

To avoid changes in how Darwin/Linux execute the tests, this commit adds
two options in PathSanitizingFileCheck: Windows compatibility makes the
given paths match both forward and backward slashes; in the additional
YAML compatibility is enabled, escaped backward slashes will also be
matched.

The Windows compatibility is enabled for all the test in case the tests
are running on Windows (change done in lit.cfg), while the YAML
compatibility is only enabled for those tests that might need it (like
the PCH bridging header one). This is in order to not allow possible
empty path components in tests that do not deal with YAML escaped paths.
2019-04-05 18:48:33 -07:00
Daniel Rodríguez Troitiño
0e4f9380e9 [utils] Remove unused method.
The method was not used anywhere, and Workspace provides a better alternative which gives the full path instead of just the directory name.
2019-04-05 17:39:59 -07:00
swift-ci
9a0d6e8aff Merge pull request #23781 from dcci/build-script-new 2019-04-05 17:01:38 -07:00
Davide Italiano
16d04c8838 [build-script] Hoist LLVM_LIT_ARGS computation. 2019-04-05 13:53:17 -07:00
Daniel Rodríguez Troitiño
b9e17a7656 [build-script] Move HostSpecificConfiguration out of main script.
This will allow using HostSpecificConfiguration from other parts that
are not the main script in the future.

Additionally, a lot of code that was part of BuildScriptInvocation has
been moved into HostSpeficiaConfiguration because nobody else needed it,
and HostSpecificConfiguration was highly coupled with the Invocation
object (through one of its arguments). This should make the
Configuration object a better citizen in other scenarios.
2019-04-04 19:21:42 -07:00
swift-ci
36b562d57b Merge pull request #23803 from drodriguez/build-script-move-call-without-sleeping 2019-04-04 19:06:07 -07:00
Stephen Canon
c5e3f85378 Revert SE-0246 (#23800)
* Revert "Merge pull request #23791 from compnerd/you-know-nothing-clang"

This reverts commit 5150981150, reversing
changes made to 8fc305c03e.

* Revert "Merge pull request #23780 from compnerd/math-is-terrible"

This reverts commit 2d7fedd25f, reversing
changes made to 0205150b8f.

* Revert "Merge pull request #23140 from stephentyrone/mafs"

This reverts commit 777750dc51, reversing
changes made to 0c8920e747.
2019-04-04 19:35:25 -04:00
Daniel Rodríguez Troitiño
a92eff843e [build-script] Move call_without_sleeping into the shell module 2019-04-04 15:21:43 -07:00
Davide Italiano
06ffc9d03b [build-script] Add --time-test to build-script invocation for lldb tests.
<rdar://problem/48986159>
2019-04-03 16:15:10 -07:00
Saleem Abdulrasool
b3a2e40a0f Merge pull request #23764 from compnerd/regexes-can-solve-everything
utils: be more flexible about path separators
2019-04-03 15:42:49 -07:00
swift-ci
756eec5765 Merge pull request #23775 from compnerd/layout 2019-04-03 15:18:20 -07:00
Saleem Abdulrasool
cc026880f1 build-script: adjust the path for the new layout
Merging the CoreFoundation build into the Foundation build results in
the build tree layout to change.  Adjust the parameters for that to
allow a migration.
2019-04-03 13:23:14 -07:00
Steve (Numerics) Canon
bcc7e2c901 Obscene rant about linters. 2019-04-03 15:15:28 -04:00
Saleem Abdulrasool
95678d9ab0 utils: be more flexible about path separators
The path separator on Windows is `\` and the path separator on Linux,
android, macOS is `/`.   Permit both sets of path separators.
2019-04-03 08:17:49 -07:00
Steve (Numerics) Canon
3fda509805 Implementation of ElementaryFunctions / Real protocols.
This commit implements SE-0246, by adding conformance to Real to the Float, CGFloat, Double, and Float80 types, implemented either in terms of the system's C math library, existing standard library functionality, or LLVM intrinsics. It includes basic test coverage for these new functions, and deprecates and obsoletes *some* existing functionality in the Platform overlay. We still need to make a decision about how to handle the remaining "tgmath" functions, because obsoleting them is technically a source-breaking change (if users have unqualified names like "exp(1)", it's fine, but it would break users who have used qualified names like "Darwin.exp(1)".)
2019-04-02 18:49:31 -04:00
Steve (Numerics) Canon
2f7435da7d First non-intrinsic functions. 2019-04-02 18:48:08 -04:00
Steve (Numerics) Canon
b8d1481fc6 WOW\! 100% less gratuitous type machinery at runtime\! 2019-04-02 18:48:08 -04:00
Steve (Numerics) Canon
5e5cd76e8d Work in progress towards "Mathsable"
Fundamental decision to be made; should implementation hooks present like `Float.exp(_ x: Float) -> Float` or like `Float.Maths.exp(_ x: Float) -> Float`? Having the intermediate namespace to group them as in the second is definitely nicer, but it requires a little bit of extra machinery, and much more importantly, there doesn't seem to be any way to make access to the static `Maths` associatedtype transparent.
2019-04-02 18:48:08 -04:00
Daniel Rodríguez Troitiño
8c721dee4c [update-checkout] Don't use env for portability.
env is not portable in systems that do not have env, like for example Windows. However, passing the environment is supported by shell.run using the env parameter, which should be portable.

For some reason shell.run doesn't merge the environment with the current environment by default, so we do it externally to not modify other possible usages of the function.
2019-03-29 16:29:00 -07:00
Xi Ge
f720459b0c Merge pull request #23664 from nkcsgexi/install-oss-digester
cmake: install swift-api-digester and swift-api-checker into the OSS toolchain. SR-10220
2019-03-29 14:26:34 -07:00
Xi Ge
db0f39fc9a cmake: install swift-api-digester and swift-api-checker into the OSS toolchain. SR-10220 2019-03-29 11:47:17 -07:00
Xi Ge
dc3261f14b swift-api-checker: avoiding empty file for fixed module list. rdar://49382586 2019-03-28 15:37:21 -07:00
Andrew Trick
266365a880 build-script fix for --extra-swift-args.
Passing an empty string to this option either as
"--extra-swift-args=''" or "--extra-swift-args ''" would cause
build-script-impl to fail to parse some arbitrary number of other
options.

This is impossible to debug from the build log because all of the
build-script-impl options still show up in the log. So, cutting and
pasting the build-script-impl command actually works.

Turns out this is why build-script build and install stages never
worked for me, beyond running cmake.
2019-03-27 14:33:05 -07:00
Saleem Abdulrasool
cc568d2cd4 Merge pull request #22532 from drodriguez/enable-non-executable-android-tests
[android] Allow executing only Android compiler tests.
2019-03-25 10:08:22 -07:00
eeckstein
8527ac5e56 Revert "Revert "For checking deterministic compilation, do an initial "warm-u…" 2019-03-22 15:58:01 -07:00
Daniel Rodríguez Troitiño
9cec482ef3 [android] Allow executing only Android compiler tests.
The manipulation of host-test and skip-android-host was a little
different than the equivalent skip-ios-host and similar variables. These
changes make them closer and allows executing only the compiler tests,
but skip the test that need an Android device to run.

- Disables the upload command of the tests if the subset is the
  non-executable tests. The non-executable test do not need to be
  uploaded, and in the case of Android, a device doesn't need to be
  connected, so trying to connect to one will fail.
- Fix a problem where the swift_interpreter feature was removed without
  first checking if it was really added.
- Only enable the host tests (the compiler tests) in the Android CI
  preset (there's no device attached to that server, but currently only
  the Linux tests were being executed, which doesn't make a lot of
  sense).
- Move the decision about which platform support device/host tests into
  the platform themselves, which allows Android to have device/host
  tests. Also modify a little bit the logic around enabling/disabling
  the test suite to allow running only the host tests of a platform.
- Fix the suffix name for the target of non-executable tests in a couple
  of places.
2019-03-22 14:43:00 -07:00
Arnold Schwaighofer
a67f3b919d Merge pull request #23452 from aschwaighofer/add_test_optimize_none_implicit_dynamic
Add a test mode to exercise implicit dynamic
2019-03-22 06:24:14 -07:00
Xi Ge
246bfbcc4c linting 2019-03-21 20:29:33 -07:00
Xi Ge
80330d6ee4 swift-api-checker: allow the script to take additional flags to pass down to the executable 2019-03-21 17:25:01 -07:00
Arnold Schwaighofer
ddcfb1069a Remove duplicate line I introduced 2019-03-21 13:53:11 -07:00
Arnold Schwaighofer
83cc98d5ec Fix python build scripts 2019-03-21 13:50:47 -07:00
Julian Lettner
8ed0ebe5f3 Merge pull request #23455 from apple/build-compile_rt-with-libdispatch-support
Build compiler-rt with TSan interception for libdispatch on non-Apple platforms
2019-03-21 12:11:41 -07:00