Commit Graph

1759 Commits

Author SHA1 Message Date
Saleem Abdulrasool
671576d2d3 Basic: silence MSVC pedantic warning (NFC)
The constructor here required multiple user-defined conversions which is
not exactly pedantically correct.  Add an explicit indicator that the
constructor being invoked is the `StringRef` constructor to convert the
`SmallString` to a `StringRef` which can then be implicitly converted to
the `Optional<StringRef>`.  This silences a MSVC warning (clang should
catch this with `-pedantic`).
2019-06-02 11:32:21 -07:00
Joe Groff
dffd1b27a1 Use autolinking to pull in compatibility libraries.
Many build systems that support Swift don't use swiftc to drive the linker. To make things
easier for these build systems, also use autolinking to pull in the needed compatibility
libraries. This is less ideal than letting the driver add it at link time, since individual
compile jobs don't know whether they're building an executable or not. Introduce a
`-disable-autolink-runtime-compatibility` flag, which build systems that do drive the linker
with swiftc can pass to avoid autolinking.

rdar://problem/50057445
2019-05-31 13:11:14 -07:00
Karoy Lorentey
d8aa67bb90 Merge branch 'master' into master-next
# Conflicts:
#	utils/build-script-impl
2019-05-29 13:09:01 -07:00
Argyrios Kyrtzidis
df721bd67f [CMake] Fix linker issue when doing a parser-lib only build 2019-05-29 11:28:25 -07:00
swift-ci
2447253c37 Merge remote-tracking branch 'origin/master' into master-next 2019-05-15 12:10:17 -07:00
Alexander Shaposhnikov
1525e9bfc5 [Windows] Add initial implementation for TaskQueue 2019-05-14 11:42:08 -07:00
swift-ci
67cf8799ed Merge remote-tracking branch 'origin/master' into master-next 2019-05-06 11:49:16 -07:00
Saleem Abdulrasool
218b37e1bb build: rename LLVM_COMPONENT_DEPENDS
This is not a target dependency but a target link.  Name the parameter
to be less misleading.  This also makes the name identical to the LLVM
parameter.
2019-05-04 19:58:28 -07:00
swift-ci
32e725208d Merge remote-tracking branch 'origin/master' into master-next 2019-05-01 18:10:37 -07:00
Slava Pestov
6d7d13fceb IRGen: Disable eager initialization of NSCoding adopters on newer targets
If a class does not have a custom @objc name, objc_getClass() can find
it at runtime by calling the Swift runtime's metadata demangler hook.

This avoids the static initializer on startup. If the class has a
custom runtime name we still need the static initializer unfortunately.

Fixes <rdar://problem/49660515>.
2019-05-01 17:43:58 -04:00
Slava Pestov
3b6ec6c651 IRGen: Move some deployment target checks to LangOptions 2019-05-01 15:13:12 -04:00
Bob Wilson
33d9e52e72 Merge remote-tracking branch 'origin/master' into master-next 2019-05-01 09:33:08 -07:00
Sam Lazarus
3d9b6396a1 Merge pull request #24059 from sl/sl/sr-10293
Allow var / let as parameter names but provide a warning and fixit to add backticks.
2019-04-26 09:30:23 -04:00
Sam Lazarus
2a38b48eea Parse / AST: Allow let / var as argument labels with a warning.
The diagnostic is now a warning and the new message alerts the user that
though it is valid to have let and var as argument label names,
they are interpreted as argument labels, not keywords.
2019-04-26 04:08:01 -04:00
Jordan Rose
f4487881e4 Add PrettyStackTraceSwiftVersion, and use it in the swiftc executable (#24235)
As pointed out on a recent JIRA, crash traces don't mention what
version of Swift you were running. Usually that can be gleaned from
the path, but not always.
2019-04-24 15:53:56 -07:00
swift-ci
efdafdce91 Merge remote-tracking branch 'origin/master' into master-next 2019-04-16 14:29:43 -07:00
Alex Langford
d8d93fd622 [CMake] Fix UUID include dir logic 2019-04-15 14:40:15 -07:00
Bob Wilson
7a8182221f Merge pull request #23765 from compnerd/r357552
Basic: adjust for LLVM SVN r357552
2019-04-08 13:34:58 -07:00
swift-ci
06a1281bb8 Merge remote-tracking branch 'origin/master' into master-next 2019-04-08 11:09:56 -07:00
Michael Gottesman
91dbbc3088 Merge pull request #23204 from compnerd/silence-in-the-library
Remove custom handling in add_swift_host_library
2019-04-08 10:49:42 -07:00
Saleem Abdulrasool
a75e8fbd21 Basic: adjust for LLVM SVN r357552
`Emscripten` is now an OS in the enumeration.
2019-04-03 09:40:07 -07:00
swift-ci
07cb3bb327 Merge remote-tracking branch 'origin/master' into master-next 2019-03-30 19:09:36 -07:00
Jason Mittertreiner
8998235ed6 Enable Child Memory Usage Tracking on Windows (#23686)
Windows requires a handle to get memory usage, so do a slight refactor
to collect the child's memory usage as it exits instead of as the parent
is cleaning up.
2019-03-30 18:54:30 -07:00
swift-ci
d45e63b98e Merge remote-tracking branch 'origin/master' into master-next 2019-03-20 13:30:07 -07:00
Michael Gottesman
384882d5f3 Merge pull request #23201 from compnerd/patience-is-not-always-a-virtue
build: introduce and switch to GYB_SOURCES
2019-03-20 13:27:32 -07:00
swift-ci
501fa43c4d Merge remote-tracking branch 'origin/master' into master-next 2019-03-19 05:49:42 -07:00
David Zarzycki
d2c5597707 [Tests] Stabilize output order maps against incidental changes
The output file map is created in DenseMap order, which is an unordered
and "unstable" collection type.
2019-03-18 07:22:23 -04:00
Saleem Abdulrasool
8ed5c1a4bc build: introduce and switch to GYB_SOURCES
This avoids us having to pattern match every source file which should
help speed up the CMake generation.  A secondary optimization is
possible with CMake 3.14 which has the ability to remove the last
extension component without having to resort to regular expressions.  It
also helps easily identify the GYB'ed sources.
2019-03-11 13:48:54 -07:00
Saleem Abdulrasool
b0005e9f87 build: remove C_COMPILE_FLAGS from add_swift_host_library
Use the appropriate CMake mechanism for controlling flags for building
the code.
2019-03-10 15:38:55 -07:00
swift-ci
6bd2e12411 Merge remote-tracking branch 'origin/master' into master-next 2019-03-01 18:09:24 -08:00
Jason Mittertreiner
b895f0cf17 Have Windows Call Signaled Callback on Crashes (#23018)
The signaled callback is treated more as a general crash handler clean
up wise. While it doesn't 100% line up, have Windows call the signaled
callback on exit codes considered to be errors.
2019-03-01 17:49:26 -08:00
swift-ci
2a8c973aff Merge remote-tracking branch 'origin/master' into master-next 2019-02-28 16:09:52 -08:00
Brent Royal-Gordon
f1d1df3b30 Merge pull request #22842 from brentdax/target-practice
Name platform-specific module files using a normalized target triple
2019-02-28 16:07:37 -08:00
swift-ci
0f95994a50 Merge remote-tracking branch 'origin/master' into master-next 2019-02-28 00:12:45 -08:00
Jason Mittertreiner
2680c34a15 Implement SeparateErrors on Windows
To display stack traces from child processes, the driver combines stdout
and stderror together on Unix. This makes the Basic implementation also
do that.
2019-02-27 14:39:50 -08:00
Brent Royal-Gordon
64760981d0 [NFC] Restyle getTargetSpecificModuleTriple()
* Adds documentation comments.
* Turns redundant cases into comments.
* Removes the else branch in a couple “if (…) return …; else return …;” patterns.
2019-02-27 11:44:10 -08:00
Brent Royal-Gordon
c1cc51d1f3 Use target triple for “universal” modules
When loading a module supporting multiple targets, the module loader now looks for a file named with a normalized version of the target triple first, and only falls back to the architecture name if the normalized triple is not found.
2019-02-27 11:43:12 -08:00
swift-ci
37da95021f Merge remote-tracking branch 'origin/master' into master-next 2019-02-24 10:29:22 -08:00
Argyrios Kyrtzidis
04992a58d1 [CMake] Provide a way to build the minimum things necessary for the syntax parser library
These changes allow to optionally perform a very fast build that is targeted to only produce the syntax parser library.
Part of addressing rdar://48153331
2019-02-23 11:31:31 -08:00
swift-ci
a61b1f049b Merge remote-tracking branch 'origin/master' into master-next 2019-02-23 11:09:25 -08:00
Argyrios Kyrtzidis
05893a8595 Merge pull request #22831 from compnerd/cmake-modernise-1
cmake: switch host libraries to use `target_link_libraries`
2019-02-23 10:57:07 -08:00
swift-ci
fa605bce12 Merge remote-tracking branch 'origin/master' into master-next 2019-02-22 21:49:30 -08:00
Saleem Abdulrasool
9934532e07 cmake: switch host libraries to use target_link_libraries
This is a follow up to the discussion on #22740 to switch the host
libraries to use the `target_link_libraries` rather than the
`LINK_LIBRARIES` special handling.  This allows the dependency to be
properly tracked by CMake and allows us to use the more modern syntax.
2019-02-22 15:28:07 -08:00
Jason Mittertreiner
ac0d9ef31a Fixed Driver Dependency Tests on Windows
All Driver/Dependency Tests now pass on Windows!
2019-02-21 11:19:57 -08:00
Bob Wilson
93b29dcc89 master-next: Add switch case for new Hurd triple in llvm r347832 2019-02-08 14:22:56 -08:00
Saleem Abdulrasool
adcdc39791 swift: update for LLVM SVN r344140
Update swift's usage of clang::vfs which has been hoisted into LLVM.
2019-02-07 17:53:42 -08:00
Bob Wilson
411fae3e5e [master-next] Add HermitCore OS type for LLVM triples
LLVM r340675 added a new HermitCore OS type to triples, which broke the
Swift build because it is using -Werror,-Wswitch and the new value was not
handled in swift::getPlatformNameForTriple
2019-02-07 16:52:45 -08:00
Saleem Abdulrasool
5daeb562d7 Basic: adjust for SVN r353268
The versioning script has changed for the preparation for the monorepo
adjustment and to generalise it further.  Update our usage.
2019-02-06 15:26:07 -08:00
swift-ci
7ff91aa902 Merge remote-tracking branch 'origin/master' into master-next 2019-01-29 04:29:55 -08:00
Slava Pestov
0882695f64 Mangler: Tighten up round-trip check 2019-01-29 02:15:56 -05:00