Commit Graph

1272 Commits

Author SHA1 Message Date
swift-ci
c51550f30e Merge remote-tracking branch 'origin/main' into rebranch 2021-09-30 15:11:41 -07:00
Erik Eckstein
af71088d29 libswift: bootstrapping build
Adding build modes for libswift: off, hosttools, bootstrapping, bootstrapping-with-hostlibs
The two bootstrapping modes are new. For details see libswift/README.md
2021-09-28 18:51:42 +02:00
swift-ci
2fce52d379 Merge remote-tracking branch 'origin/main' into rebranch 2021-09-23 12:14:03 -07:00
Ben Langmuir
3cdf66ca09 [test] Restrict two driver tests to macOS
These appear to fail when run for other configurations, so restrict them
for now until we can figure out what is going wrong.
2021-09-23 11:52:47 -07:00
Max Desiatov
9e7c3c9cd8 Add a test for Wasm toolchain in the legacy driver 2021-09-18 21:34:23 +01:00
swift-ci
f3212c5eed Merge remote-tracking branch 'origin/main' into rebranch 2021-09-09 08:14:56 -07:00
Alexis Laferrière
a144aa78cd Merge pull request #38966 from xymus/one-way-emit-module
[Driver] Force the test one-way-merge-module-fine to use emit-module
2021-09-09 08:11:35 -07:00
Evan Wilde
656a91777a Disabling driver-time-compilation test
This test is pretty brittle on such a short file. If a member of the
timer output is zero, that member is omitted from the output. With how
short the file is, various fields come back zero occasionally.

On the Linux CI bot, there was a run with no "System Time", while I was
seeing it failing locally due to other missing time fields.
2021-09-08 15:44:51 -07:00
Alexis Laferrière
3ddbb88385 [Driver] Force the use of merge-module in merge-module specific test
As support, accept but ignore the -no-emit-module-separately flag in the
C++ driver.
2021-09-08 10:20:20 -07:00
swift-ci
cd7ed018bf Merge remote-tracking branch 'origin/main' into rebranch 2021-09-02 11:56:28 -07:00
Varun Gandhi
5a31f2c0f1 Add rpath test cases for Catalyst. 2021-09-02 09:03:23 -07:00
Varun Gandhi
4a16261c4d [Driver] Update OS versions for rpath checks.
Make sure that we add the appropriate rpaths so that the appropriate
_Concurrency back-deployment library can be picked up.

We don't need to update the Swift driver since it uses the C++ driver
as the source of truth to determine if the relevant rpath should be
added or not.
2021-09-01 15:37:24 -07:00
Artem Chikin
1ca692f46b [NFC] Adjust driver-time-compilation.swift to the new format of llvm::Timer
Resolves rdar://81809942
2021-08-30 17:26:41 -07:00
Doug Gregor
9d4ce58ed6 Merge pull request #38930 from DougGregor/concurrency-compatibility-library
[concurrency] Implement a compatibility .a library for Concurrency.
2021-08-28 22:40:37 -07:00
Kavon Farvardin
027a41dcc1 Merge pull request #39077 from kavon/disable-flaky-test
Disable flaky `Driver/lock_interface.swift` test to keep CI reliable.
2021-08-27 10:34:51 -07:00
Kavon Farvardin
646df735cf disabling flaky test to unblock CI
This Driver/lock_interface.swift test has been
spontaenously failing for the past few days.
I've decided to disable it until an investigation
and fix can happen.

rdar://82261445
2021-08-27 10:29:48 -07:00
Varun Gandhi
0e13fcd857 Merge pull request #38750 from RAJAGOPALAN-GANGADHARAN/sr_14122
Improve usability of -l flag
2021-08-27 10:25:34 -07:00
RAJAGOPALAN-GANGADHARAN
855eeaf575 Fix ci test failure 2021-08-24 09:24:51 +05:30
Kuba (Brecka) Mracek
8cf6c2e71b [Driver] -c with LTO should still emit bitcode (#35026) 2021-08-19 21:05:35 -07:00
Michael Gottesman
1bc94bfa6a [concurrency] Implement a compatibility .a library for Concurrency.
In a back deployment scenario, this will provide a place where one could provide
function implementations that are not available in the relevant stdlib.

This is just setting up for future work and isn't doing anything interesting
beyond wiring it up/making sure that it is wired up correctly with tests.
2021-08-18 09:35:37 -07:00
Doug Gregor
cafa2523d9 Merge pull request #38742 from beccadax/warring-triad
Start testing Swift 6 mode changes
2021-08-18 05:52:13 -07:00
Rajagopalan-Gangadharan
cd7a30b43a Address Test review comments 2021-08-11 10:09:23 +05:30
Saleem Abdulrasool
e893c6f2ae test: remove bashisms from Driver.Dependencies.one-way-external-delete-fine
This is needed to repair the test suite on Windows.
2021-08-10 18:47:26 -07:00
Rajagopalan-Gangadharan
8946792301 Add seperate test since linker test is disabled 2021-08-07 16:23:25 +05:30
Rajagopalan-Gangadharan
82665ccd6f Add space test case to repl tests 2021-08-05 00:21:35 +05:30
Rajagopalan-Gangadharan
c2ce6c5533 Add Tests to check if adding space doesn't break invocation 2021-08-04 21:52:26 +05:30
Becca Royal-Gordon
1fbded6629 Allow -swift-version 6 in asserts compilers only
To allow us to start testing language changes tied to a future Swift 6 mode without actually *shipping* a Swift 6 mode to customers who might accidentally use it before it's ready.

This commit also adds parallel tests for a number of already existing (but untested) Swift 6 mode behaviors.
2021-08-03 18:44:49 -07:00
Mishal Shah
3722bcb85a Revert "[concurrency] Implement a compatibility .a library for Concurrency." 2021-07-29 11:26:51 -07:00
Michael Gottesman
78166f765b Merge pull request #38616 from gottesmm/pr-43566c09aa169640705f6291f3dd981cc30040da
[concurrency] Implement a compatibility .a library for Concurrency.
2021-07-25 12:56:38 -07:00
Saleem Abdulrasool
3a75ec8451 Update independent-fine.swift
Remove bashisms harder.  There was a second instance of a bash specific pattern which breaks the Windows 2017 CI.
2021-07-24 12:47:19 -07:00
Michael Gottesman
8441871a04 [concurrency] Implement a compatibility .a library for Concurrency.
In a back deployment scenario, this will provide a place where one could provide
function implementations that are not available in the relevant stdlib.

This is just setting up for future work and isn't doing anything interesting
beyond wiring it up/making sure that it is wired up correctly with tests.
2021-07-23 17:30:18 -07:00
Robert Widmann
262e2b335d Eat -experimental-emit-module-separately
SourceKit invokes the legacy driver. Providing this flag in the IDE
means the command lines SourceKit forms to run semantic requests in the
editor are all invalid.

Teach the legacy driver to eat this flag.

rdar://80811565
2021-07-23 13:29:29 -07:00
Artem Chikin
acde5904b4 Disable Driver/static-stdlib-autolink-linux.swift to unblock PR testing 2021-07-21 09:04:00 -07:00
Saleem Abdulrasool
589a1be25c test: attempt to repair the test on Windows
PR #38356 regressed the Windows (2017) CI.  This attempts to remove the bashisms from the test to repair the test on Windows.
2021-07-20 08:35:32 -07:00
Owen Voorhees
b14f2b9934 Merge pull request #38264 from jslegendre/driver-lto-library
[LTO] Driver support for -lto_library flag
2021-07-14 20:36:30 -07:00
David Ungar
403159cf35 test fixes 2021-07-12 16:20:08 -07:00
Rintaro Ishizaki
45a4c539d5 [Tests] Disable some driver tests while investigating 2021-07-12 15:18:56 -07:00
Jeremy Legendre
ebd59927d6 Use Swift-style args for Driver 2021-07-05 23:56:42 -04:00
Jeremy Legendre
35735e7d0c [LTO] Driver support for -lto_library flag
This commit adds support for the -lto_library flag, allowing users to specify a custom LTO library on Darwin. This also fixes an issue where the default LTO library is used even if Driver is run from inside an alternate toolchain.
2021-07-05 18:01:40 -04:00
David Zarzycki
bd90cd8f91 [testing] Add ALLOW_RETRIES to buggy test 2021-07-02 09:40:24 -04:00
David Ungar
c895dd69b4 Adjust test to cope with better remark in new driver 2021-06-26 22:56:33 -07:00
Mishal Shah
5a7b8c7922 Merge pull request #37823 from apple/xcode-13-beta-main
[main] Support Xcode 13 beta
2021-06-10 09:21:09 -07:00
Mishal Shah
23c3b15f5f Support Xcode 13 beta
* Updating availability versions
* Remove all remaining overlays in stdlib/public/Darwin/*:
   - ObjectiveC
   - Dispatch
   - CoreFoundation
   - CoreGraphics
   - Foundation
2021-06-07 12:04:31 -07:00
Artem Chikin
3dc6837bc4 Pass .tbd inputs down to the linker invocation.
Part of rdar://78881502
2021-06-04 14:44:09 -07:00
Robert Widmann
f6b2294d5a Undo Force Load + Incremental Ban on Darwin Platforms
Gather 'round to hear tell of the saga of autolinking in incremental
mode.

In the beginning, there was Swift code, and there was Objective-C code.
To make one import bind two languages, a twinned Swift module named the same as an
Objective-C module could be imported as an overlay. But all was not
well, for an overlay could be created which had no Swift content, yet
required Swift symbols. And there was much wailing and gnashing of teeth
as loaders everywhere disregarded loading these content-less Swift
libraries.

So, a solution was found - a magical symbol _swift_FORCE_LOAD_$_<MODULE>
that forced the loaders to heed the dependency on a Swift library
regardless of its content. It was a constant with common linkage, and it
was good. But, along came COFF which needed to support autolinking but
had no support for such matters. It did, however, have support for
COMDAT sections into which we placed the symbol. Immediately, a darkness
fell across the land as the windows linker loudly proclaimed it had
discovered a contradiction: "_swift_FORCE_LOAD_$_<MODULE> cannot be
a constant!", it said, gratingly, "for this value requires rebasing."
Undeterred, we switched to a function instead, and the windows linker
happily added a level of indirection to its symbol resolution procedure
and all was right with the world.

But this definition was not all right. In order to support multiple
translation units emitting it, and to prevent the linker from dead
stripping it, Weak ODR linkage was used. Weak ODR linkage has the nasty
side effect of pessimizing load times since the dynamic linker must
assume that loading a later library could produce a more definitive
definition for the symbol.

A compromise was drawn up: To keep load times low, external linkage was
used. To keep the linker from complaining about multiple strong
definitions for the same symbol, the first translation unit in the
module was nominated to recieve the magic symbol. But one final problem
remained:

Incremental builds allow for files to be added or removed during the
build procedure. The placement of the symbol was therefore dependent
entirely upon the order of files passed at the command line. This was no
good, so a decree was set forth that using -autolink-force-load and
-incremental together was a criminal offense.

So we must compromise once more: Return to a symbol with common linkage,
but only on Mach-O targets. Preserve the existing COMDAT-friendly
approach everywhere else.

This concludes our tale.

rdar://77803299
2021-05-24 15:53:13 -07:00
Saleem Abdulrasool
fc3ccdc542 Driver: simplify the profiler linking on Windows
Rather than computing an absolute path relative to Swift's resource
directory, use the compiler driver to locate the profiling runtime
relative to the C/C++ compiler's resource directory.  This ensures that
we correctly locate the runtime.  Additionally, because clang adds the
clang resource directory to the library search path, we do not need to
compute the path and can rely on the linker locating the runtime via the
library search path.  This simplifies the handling for the profile
runtime linking on Windows.

Out of abundant paranoia, place the library link request after the
forced symbol inclusion as a GC root to ensure that `/opt:ref` will not
accidentally dead strip the symbol and force a reload of the library.
2021-05-23 17:10:15 -07:00
Saleem Abdulrasool
b3d5181ac4 Driver: correct profiling symbol preservation on Windows
The Windows linker does not support `-u`.  Furthermore, the compiler
driver does not forward the `-u` option to the linker.  We correctly use
the `/include:` option from the linker.  This should ensure that the
symbol is preserved even with `/opt:ref`.  This spelling should be
compatible with both lld and link, which should provide sufficient
portability.

Take the opportunity to make it more obvious that the two parameters are
creating a pair that will be concatenated by using a braced initializer.

See
https://docs.microsoft.com/en-us/cpp/build/reference/include-force-symbol-references?view=msvc-160
for more details on the option.
2021-05-23 10:43:28 -07:00
Saleem Abdulrasool
1f11627f09 Driver: do not generate a dSYM bundle for static archives
When building a static library with debug information, do not create a
dSYM generation job as it cannot be executed on a non-image target.
This is important for the case where the single invocation is both the
compile and link job.

This was detected in conjunction with @gottesmm.
2021-05-20 11:09:03 -07:00
Xi Ge
01b1aea958 Driver: diagnose options that are only supported in the new driver 2021-05-11 16:28:57 -07:00
Colton Schlosser
b01511832d Add CanonicalName to mock SDKSettings.json 2021-05-09 17:20:14 -05:00