Commit Graph

1794 Commits

Author SHA1 Message Date
Stephen Canon
772d7ec3c5 Merge branch 'SE-0067' of https://github.com/stephentyrone/swift into stephentyrone-SE-0067
Implements almost all of SE-0067. There are a few outstanding features; this implementation does not have:

- formRemainder(dividingBy:)
- formSquareRoot()
- addProduct(_:,_:)

which require additions to the Builtin module. I can probably figure out how to do these, but I haven't had a chance to do so yet. Also missing are the generic initializers and comparisons whose implementation depends on having new Integer protocols.

The last remaining feature of SE-0067 is that while the basic operators +,-,*,/, etc are moved onto the FloatingPoint protocol, they are still required on the concrete types in order to disambiguate overloads. Fixing this seems to require either modifying the overload resolution rules or removing these operators from some other protocols. Or it might just require that someone smarter than me looks at the problem.

Passes the existing tests locally (with the included changes). I'm working on additional tests for the new features.
2016-05-11 22:11:21 -04:00
Michael Gottesman
7523d1a60b When producing backtraces, do not use backtrace_symbol, invoke dladdr directly.
Previously, we were using backtrace_symbol and then parsing/modifying its
output. By just using dladdr directly, we have a cleaner and more robust
solution.

rdar://25064742
2016-05-11 15:40:10 -07:00
Mishal Shah
527bef67e0 [Toolchain] Change OverrideBuildSettings to string from bool 2016-05-10 13:57:06 -07:00
Anton Blanchard
0b8371d937 Fix stdlib deployment targets for powerpc64 and powerpc64le
We use powerpc64 and powerpc64le for the target names, not ppc64 and
ppc64le.
2016-05-10 04:29:54 +00:00
Stephen Canon
6429eabf74 Implement the new FloatingPoint protocols from SE-0067.
There are a couple of features that are not yet implemented, because they require additions to the Builtin module.  Specifically, this implementation does not have:

- formRemainder(dividingBy:)
- formSquareRoot()
- addProduct(_:,_:)

Also missing are the generic initializers and comparisons whose implementation depends on having new Integer protocols.

The last remaining feature of SE-0067 is that while the basic operators +,-,*,/, etc are moved onto the FloatingPoint protocol, they are still required on the concrete types in order to disambiguate overloads.  Fixing this seems to require either modifying the overload resolution rules or removing these operators from some other protocols.  Or it might just require that someone smarter than me looks at the problem.

Passes all the existing tests (with the included changes).  I'm working on additional tests for the new features.
2016-05-09 10:34:13 -04:00
Dmitri Gribenko
01f5c118ba Merge pull request #2365 from rintaro/build-script-long-test-swiftonly
[build-script] Don't run other products tests in "only_long" mode.
2016-05-08 22:06:36 -07:00
practicalswift
343cf6e876 [gardening] Fix recently introduced PEP-8 violation. (#2439) 2016-05-06 23:32:28 -07:00
Michael Gottesman
b3e3dbd88c [lto] Fix thinko where we were always building llvm with -gline-tables-only.
This did not happen with Swift, only with LLVM.
2016-05-06 15:17:26 -07:00
practicalswift
68b148cfb1 [gardening] Fix recently introduced typos. 2016-05-06 20:31:38 +02:00
swift-ci
f2e13c5a9a Merge pull request #2406 from Bouke/swiftpm-foundation 2016-05-05 19:25:59 -07:00
Bouke Haarsma
269bd1dc2c [SwiftPM] Build with foundation 2016-05-05 22:28:05 +02:00
Rintaro Ishizaki
4dfeabc553 [gardening] Fix a flake8 warning (#2383)
F401 'which' imported but unused
2016-05-04 23:25:28 -07:00
Brian Gesiak
be25fce903 Merge pull request #2202 from modocache/build-script-impl-cross-variables
[build-script] Remove extra "cross tools" variable
2016-05-04 19:08:52 -07:00
Daniel Dunbar
eb582cc29b [CMake] Add support for installing FileCheck, if requested. 2016-05-04 16:29:34 -07:00
David Farler
405df02719 Merge pull request #2395 from bitjammer/remote-mirror-headers
Install SwiftRemoteMirror headers into swift-remote-mirror-headers co…
2016-05-04 11:24:18 -07:00
David Farler
d5bcda69a3 Install SwiftRemoteMirror headers into swift-remote-mirror-headers component
rdar://problem/25539204
2016-05-04 01:53:03 -07:00
Rintaro Ishizaki
b1e7f2cd00 [build-script][SR-1287] Revert "Clear CMakeCache.txt before (re)configuration"
https://cmake.org/runningcmake/
> If you have not already hand-edited the cache file,
> you could just delete it before re-running CMake.

is not quite right.
see: https://cmake.org/Bug/view.php?id=14820
2016-05-04 16:59:21 +09:00
Brian Croom
53bdf34b85 [build-preset] Skip building benchmarks on the XCTest development preset
Building benchmarks does not provide any useful feedback while working
on Corelibs XCTest
2016-05-03 08:40:22 -04:00
Mishal Shah
9722b4da3a [build-script] Fix --verbose-build argument to use bool type 2016-05-02 17:22:40 -07:00
Rintaro Ishizaki
6fd6675296 [build-script] Don't run other products tests in "only_long" mode.
`build-script --long-test` (without -t or -T) should not run tests
other than long tests. Currently, only "swift" has long tests.
2016-05-02 15:06:31 +09:00
Michael Gottesman
88b412268e Merge pull request #2360 from gottesmm/lto-changes-for-upstream
Lto changes for upstream
2016-05-01 14:05:19 -07:00
Dave Abrahams
10bddb428a [build-script] Fix uses of build_support.which
This might not be the most principled way to do it (not too familiar
with this idiom of nested python modules named the same as their only
components), but it seems to have worked.
2016-05-01 14:00:23 -07:00
Michael Gottesman
4e6648d8a0 [lto] Use more conservative estimates of clang/swift memory usage.
I found experimentally that my former esimates were too low. I have
found that these numbers work pretty well.

rdar://24717107
2016-05-01 13:12:04 -07:00
Michael Gottesman
7505b6b8dd [lto] Use -DLLVM_ENABLE_LTO to enable llvm lto instead of -DCMAKE_{C,CXX}_FLAGS
This not only is the more canonical way to enable lto in LLVM but in addition
without this change, the swift compiler unittests will not build with LTO
resulting in funky LTO errors like rdar://25968091.

rdar://24717107
2016-05-01 13:12:04 -07:00
practicalswift
4613b1712b Merge pull request #2359 from practicalswift/typo-fixes-20160501
[gardening] Fix recently introduced typos: "adavances" → "advances", etc. (10 typos)
2016-05-01 20:11:45 +02:00
practicalswift
540cb751ac [gardening] Fix recently introduced typo: "adavances" → "advances"
[gardening] Fix recently introduced typo: "compie" → "compile"

[gardening] Fix recently introduced typo: "consise" → "concise"

[gardening] Fix recently introduced typo: "dengerate" → "degenerate"

[gardening] Fix recently introduced typo: "encodeded" → "encoded"

[gardening] Fix recently introduced typo: "equvalent" → "equivalent"

[gardening] Fix recently introduced typo: "guaranted" → "guaranteed"

[gardening] Fix recently introduced typo: "overridde" → "override"

[gardening] Fix recently introduced typo: "subsquence" → "subsequence"

[gardening] Fix recently introduced typo: "substraction" → "subtraction"

[gardening] Fix recently introduced typo: "whiltespace" → "whitespace"
2016-05-01 20:07:18 +02:00
practicalswift
6cf5f9d255 [gardening] PEP-8 fixes. 2016-05-01 13:18:30 +02:00
Daniel Dunbar
d525b8320b [build-script] Don't try to build llbuild Swift bindings as part of build-script.
- llbuild builds before Swift, so we can't use the Swift compiler we are in the
   process of building for it. For now, just disable the bindings entirely.

   This will be a problem if SwiftPM ever decides that it wants to use the Swift
   bindings to manage builds more effectively.
2016-04-29 14:22:56 -07:00
swift-ci
912017e4fc Merge pull request #2295 from rintaro/build-script-common-cmake-options 2016-04-29 05:03:07 -07:00
Rintaro Ishizaki
bb5e589cf6 [build-script] build full stdlib when --long-test
--long-test implies `validation-test`.
stdlib target should be `swift-stdlib-xxx` instead of
`swift-test-stdlib-xxx`
2016-04-29 18:04:50 +09:00
swift-ci
43a2141df2 Merge pull request #2259 from briancroom/use-xctest-build-script 2016-04-28 23:29:19 -07:00
Dmitri Gribenko
0e641cec10 Merge pull request #2314 from drewcrawford/build-script-impl
[build-script-migrator] fix TypeError
2016-04-28 23:09:06 -07:00
Rintaro Ishizaki
d0cbe06b71 [build-script] Validate and parse '--clang-compiler-version' in argparse 2016-04-29 14:54:13 +09:00
swift-ci
d86ca51c8c Merge pull request #2217 from rintaro/build-script-tests-execution 2016-04-28 03:56:10 -07:00
Todd Fiala
67a0a5b09a Revert "Revert "[Preset] Dont skip lldb test on Linux package preset""o
This reverts commit 36da6bab15.

i.e. run lldb tests during package preset.
2016-04-27 11:44:32 -07:00
Dmitri Gribenko
fc9c1f6a61 Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-04-26 10:20:31 -07:00
Drew Crawford
1300289283 [build-script-migrator] fix TypeError
When running build-script, I get the output below:

    utils/build-script --preset=drew --preset-file=../presets.ini  --preset-file=utils/build-presets.ini installable_package="`pwd`/../osx-caffeinated-$tag.tar.gz" install_destdir="`pwd`/../install" install_symroot="`pwd`/../install_symroot" symbols_package="`pwd`/../osx-caffeinated-symbols-$tag.tar.gz" darwin_toolchain_bundle_identifier="net.caffei.swift.$tag"  darwin_toolchain_display_name="caffeinated-$tag" install_toolchain_dir="/Library/Developer/Toolchains/caffeinated-$tag.xctoolchain"  darwin_toolchain_xctoolchain_name="caffeinated-$tag.xctoolchain" darwin_toolchain_version="caffeinated-$tag" darwin_toolchain_alias="caffeinated-$tag" darwin_toolchain_display_name_short="caffeinated-$tag"
    utils/build-script: using preset 'drew', which expands to utils/build-script --ios --tvos --watchos --lldb --llbuild --swiftpm --release-debuginfo --build-subdir=buildbot_osx --ios --tvos --watchos --test --validation-test --long-test --assertions --no-swift-stdlib-assertions -- --lldb-no-debugserver --lldb-use-system-debugserver --lldb-build-type=Release --verbose-build --build-ninja --build-swift-static-stdlib --build-swift-stdlib-unittest-extra --compiler-vendor=apple '--swift-sdks=OSX;IOS;IOS_SIMULATOR;TVOS;TVOS_SIMULATOR;WATCHOS;WATCHOS_SIMULATOR' --install-swift --install-lldb --install-llbuild --install-swiftpm --install-destdir=/Users/drew/Code/swift-osx/swift/../install --darwin-install-extract-symbols --install-symroot=/Users/drew/Code/swift-osx/swift/../install_symroot --install-prefix=/Library/Developer/Toolchains/caffeinated-swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a.xctoolchain/usr --test-installable-package --reconfigure --installable-package=/Users/drew/Code/swift-osx/swift/../osx-caffeinated-swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a.tar.gz --swift-enable-ast-verifier=0 '--swift-install-components=compiler;clang-builtin-headers;stdlib;sdk-overlay;license;sourcekit-xpc-service' '--llvm-install-components=libclang;libclang-headers' --installable-package=/Users/drew/Code/swift-osx/swift/../osx-caffeinated-swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a.tar.gz --symbols-package=/Users/drew/Code/swift-osx/swift/../osx-caffeinated-symbols-swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a.tar.gz --darwin-toolchain-bundle-identifier=net.caffei.swift.swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a --darwin-toolchain-display-name=caffeinated-swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a --darwin-toolchain-display-name-short=caffeinated-swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a --darwin-toolchain-name=caffeinated-swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a.xctoolchain --darwin-toolchain-version=caffeinated-swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a --darwin-toolchain-alias=caffeinated-swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a --skip-test-ios --skip-test-tvos --skip-test-watchos
    Traceback (most recent call last):
      File "utils/build-script", line 1339, in <module>
        sys.exit(main())
      File "utils/build-script", line 1335, in main
        return main_normal()
      File "utils/build-script", line 824, in main_normal
        args = migration.parse_args(parser, sys.argv[1:])
      File "utils/swift_build_support/swift_build_support/migration.py", line 34, in parse_args
        arg for arg in argv if arg != '--')
      File "/Library/Python/2.7/site-packages/argparse.py", line 1735, in parse_known_args
        namespace, args = self._parse_known_args(args, namespace)
      File "/Library/Python/2.7/site-packages/argparse.py", line 1941, in _parse_known_args
        start_index = consume_optional(start_index)
      File "/Library/Python/2.7/site-packages/argparse.py", line 1873, in consume_optional
        args = arg_strings[start:stop]
    TypeError: 'generator' object has no attribute '__getitem__'
    utils/build-script: command terminated with a non-zero exit status 1, aborting

This seems to be because the migrator script passes a generator where one was not expected.

Construct a list instead.
2016-04-26 02:02:03 -05:00
Daniel Dunbar
5b4b5ed74a [build-presents] Enable SwiftPM in incremental OS X builds.
- This is enabled for the package builder bots and the Linux, I think it is an
   oversight that it has been disabled on the OS X bots for all this time.

 - Reapplied after OS X CI has added swift-package-manager.
2016-04-25 20:07:43 -07:00
Daniel Dunbar
d574c19e9e Revert "[build-presents] Enable SwiftPM in incremental OS X builds."
This reverts commit 5469d9f8d2.

The CI builder doesn't check out SwiftPM yet, reverting until it does...
2016-04-25 16:53:17 -07:00
Dmitri Gribenko
b75d2b9df4 Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-04-25 13:50:09 -07:00
Daniel Dunbar
5469d9f8d2 [build-presents] Enable SwiftPM in incremental OS X builds.
- This is enabled for the package builder bots and the Linux, I think it is an
   oversight that it has been disabled on the OS X bots for all this time.
2016-04-25 13:40:55 -07:00
Brian Croom
b538224d67 [build-script-impl] Call into the XCTest build_script.py on all platforms
No longer invoke xcodebuild directly on Darwin for building and testing,
because XCTest's own build script now contains the platform-specific
logic.
2016-04-25 13:41:19 -04:00
Rintaro Ishizaki
4926ed55f1 [build-script][SR-237] Migrated calculation of BUILD_ARGS to Python.
Calculate `BUILD_ARGS` in `build-script`, then pass them to
`build-script-impl` using existing `--build-args` argument.
2016-04-25 16:20:40 +09:00
Rintaro Ishizaki
c025590c88 [build-script][SR-237] Migrated calculation of COMMON_CMAKE_OPTIONS to Python.
Calculate `COMMON_CMAKE_OPTIONS` in `build-script`, then pass them to
`build-script-impl` using newly introduced `--common-cmake-option` argument.
2016-04-25 14:27:29 +09:00
swift-ci
23025e48db Merge pull request #2282 from rintaro/build-script-llvmtypo 2016-04-24 17:25:54 -07:00
swift-ci
0ab51fcc1a Merge pull request #2283 from rintaro/build-script-extra-cmake-opts 2016-04-24 17:25:53 -07:00
practicalswift
17115d07ec [gardening] Fix recent PEP-8 violations. 2016-04-24 21:52:31 +02:00
Rintaro Ishizaki
fda99d16ef [build-script] Fixed --extra-cmake-options
- Get it to work as `build-script` arguments.
- Fixed quoting problem
- Replaced --user-config-args: Error for --user-config-args.
- Moved to the position where it can override any options
2016-04-24 22:14:25 +09:00
swift-ci
4e9d2b77a2 Merge pull request #2281 from rintaro/build-script-sourcedir 2016-04-24 05:59:02 -07:00
swift-ci
00a5e1feca Merge pull request #2257 from rintaro/build-script-migration-simple 2016-04-24 05:34:53 -07:00