Commit Graph

1631 Commits

Author SHA1 Message Date
Saleem Abdulrasool
4585bc53d6 build: emulate /GR- when compiling for Windows
The /GR- emulation is needed to support building on Windows.
std::function in Microsoft's C++ runtime requires the use of `typeid`.
We do not want to emit RTTI data.  `-frtti -fno-rtti-data` allows the
use of the `typeid` and `dynamic_cast` behaviours but will not emit the
RTTI data.  With this change, it is possible to build the Windows
runtime once again.
2018-03-01 14:14:02 -08:00
Saleem Abdulrasool
2e77e6a8b1 build: tweak gyb line directives
Make the quoted parameters more portable.  This is needed in order to
support building swift on Windows.  Simplify the declaration of the
flags and do a small formatting clean up.  This ensures that the ninja
generation gets the command line invocation correct.
2018-03-01 12:21:54 -08:00
David Zarzycki
b1641fd338 [CMake] Limit -momit-leaf-frame-pointer to production builds
When building with asserts or debug information, don't disable leaf
frame pointers because some debugging/analysis tools have buggy or
nonexistent support for DWARF-style backtraces.
2018-03-01 12:34:58 -05:00
swift-ci
d89cbfe481 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-28 10:40:59 -08:00
Saleem Abdulrasool
420328b886 Merge pull request #14728 from compnerd/icu-arch
build: explicitly state arch for ICU
2018-02-28 10:21:08 -08:00
swift-ci
2cd2bec970 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-21 14:55:39 -08:00
Xi Ge
1a67b5c60e cmake: mark recently added python files as gyb dependencies. 2018-02-21 12:11:00 -08:00
Thomas Roughton
5173e3c799 SwiftPrivate now builds on Windows with Pull-14710 2018-02-20 22:21:54 +13:00
Saleem Abdulrasool
e77d4c7c98 build: explicitly state arch for ICU
This is needed to support cross-compilation on targets which do not
support FAT binaries (i.e. non-MachO targets).  The primary user of this
functionality right now is Windows, but this support is needed for Linux
and android as well.
2018-02-19 23:27:54 -08:00
swift-ci
5540fb962a Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-12 12:18:12 -08:00
Saleem Abdulrasool
4a557df091 build: avoid incremental links with link.exe
This is a workaround for Visual Studio's link causing corruption with
incremental linking.  The markers for the metadata are padded out
incorrectly, resulting in load time failures.  With this, it is possible
to link with link and use the generated binaries on Windows x86_64.
2018-02-12 09:53:21 -08:00
swift-ci
c6d31e959a Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-09 08:38:05 -08:00
Doug Gregor
774bee2294 Revert "Re-apply "SwiftSyntax: Teach SwiftSyntax to use SourceKitd to serialize syntax trees. (#14424)" (#14465)"
This reverts commit f8c77e17ce.
2018-02-08 22:58:45 -08:00
swift-ci
4fc58f568f Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-08 15:18:50 -08:00
Xi Ge
f8c77e17ce Re-apply "SwiftSyntax: Teach SwiftSyntax to use SourceKitd to serialize syntax trees. (#14424)" (#14465) 2018-02-08 15:11:31 -08:00
swift-ci
5328820324 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-07 00:38:40 -08:00
Xi Ge
50cde06cf0 Revert "SwiftSyntax: Teach SwiftSyntax to use SourceKitd to serialize syntax trees. (#14424)" 2018-02-06 23:20:42 -08:00
swift-ci
f43808a8dd Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-06 22:18:19 -08:00
swift-ci
381080406a Merge pull request #14453 from gottesmm/pr-d1c58bc4a577158788cc80967f5d25326a0edd79 2018-02-06 21:59:10 -08:00
Michael Gottesman
1aeb6d54f7 [gardening] Fix documentation thinko.
I was re-reading this documentation and noticed an obvious 'thinko'. This is NFC
since I am just updating the comment.
2018-02-06 21:21:04 -08:00
swift-ci
e7655698a4 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-06 19:59:04 -08:00
Xi Ge
871c9dac2a SwiftSyntax: Teach SwiftSyntax to use SourceKitd to serialize syntax trees. (#14424)
When using SwiftSyntax as a standalone tool, we invoke Swiftc
internally to get serialized syntax trees. This is not ideal for
several reasons: (1) we have to hard-code the relative path of swiftc
to invoke it; (2) we have to rely on standard input/output to pass the
tree across the process boundaries; and (3) we have to maintain two
different ways to get syntax tree (swiftc and sourcekitd).

This patch attempts to teach SwiftSyntax to use SourceKitd to get the
tree just like other clients. We first add a SourceKitd client library
written in Swift; and next teach SwiftSyntax to adopt this SourceKitd
client-side library. For platforms other than MacOS, we still use Swiftc
to get syntax trees. This client library also allows us to add 
SourceKitd tests in Swift.

This patch also re-enables several flaky tests.
2018-02-06 19:40:16 -08:00
swift-ci
9983d642c0 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-02 15:58:03 -08:00
Saleem Abdulrasool
3e21e7ad9f build: canonicalise the windows paths prior to use
In order to substitute the path into the VFS overlay, we need to escape
the paths.  Instead, opt on the CMake behaviour of
`get_filename_component` providing the canonicalised path with forward
slashes rather than backslashes.  This allows the overlay to be used on
Windows as well as Linux.
2018-02-02 11:37:01 -08:00
Thomas Roughton
7c2230bc56 Fix cross-compilation for the Windows stdlib
Disable SwiftPrivate, remove -Wl,-z,defs, and use the VFS overlay for compiling the runtime.
2018-02-01 22:08:18 +13:00
swift-ci
3c3d809e5a Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-31 12:38:13 -08:00
David Zarzycki
9529a7d572 [build system] Speculative Apple lld fix 2018-01-31 13:32:08 -05:00
swift-ci
8053b943de Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-30 04:25:46 -08:00
David Zarzycki
91823273d2 [build system] Prefer LLD if it exists (#14165)
Other changes:
1) Minimize unified versus build-script build differences.
2) Stop trying to make runtime variables have "protected" visibility.
   This combination is meaningless and lld rightly complains.

Finally, this blog post is worth reading:
http://www.airs.com/blog/archives/307
2018-01-30 07:18:36 -05:00
swift-ci
494b5a9216 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-29 13:11:12 -08:00
Mike Ash
5e2b11d42d Merge pull request #14157 from mikeash/conditionally-disable-runtimefunctioncounters
[Runtime] Remove RuntimeFunctionCounters in no-assert builds.
2018-01-29 15:48:32 -05:00
swift-ci
9f1bd1f628 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-26 18:34:27 -08:00
Saleem Abdulrasool
affbaca50d build: filter out a filtering list, 80-col (NFC)
Rather than check the two names individually use a `IN_LIST` to make it
simpler to reason about.  Wrap another conditional to 80-columns.  NFC.
2018-01-26 16:06:09 -08:00
Saleem Abdulrasool
f8beec1b21 build: tweak whitespace (NFC)
This makes it easier to read and see what is going on.  This made it
easier to see what parameters were being passed when debugging the
windows cross-compilation dependencies.
2018-01-26 16:06:09 -08:00
Mike Ash
f48bd293cb [Runtime] Remove RuntimeFunctionCounters in no-assert builds.
A build option to include or exclude RuntimeFunctionCounters. By default, it's enabled when assertions are enabled.

rdar://problem/35864525
2018-01-25 12:18:25 -05:00
swift-ci
cd13953d31 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-13 02:58:35 -08:00
Michael Gottesman
4a8dc3c4e5 [cmake] Add support for compiling all swift libraries with guaranteed normal arguments.
I was using --extra-swift-args before, but lets do this for real now.

rdar://34222540
2018-01-13 02:56:52 -08:00
swift-ci
324c628e17 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-08 13:27:11 -08:00
swift-ci
cc373f9c30 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-08 12:27:47 -08:00
Ben Langmuir
a6c5b81f15 Revert "build: switch to C++14" 2018-01-08 12:26:06 -08:00
Bob Wilson
15ac679694 master-next: fix PR13574 for Linux
Set the deployment target to an empty string for non-Darwin platforms
so that it is safe to append to the target triple without guarding it
with a check for Darwin.
2017-12-21 08:33:18 -08:00
Bob Wilson
b7981aa6ea master-next: Set the deployment version correctly in -target options.
This change leaves in place the use of -m*-version-min options, but
fixes the -target options to match. We can eventually remove the use of
the -m*-version-min options after everyone has moved to build with
versions of Clang that correctly handle the deployment version in the
-target option.
2017-12-20 23:15:44 -08:00
Saleem Abdulrasool
aa0cec68df build: switch to C++14
Switch to C++14 by default as Windows now requires it, and there are a
couple of useful features.
2017-12-18 15:34:18 -08:00
swift-ci
0302515cf0 Merge remote-tracking branch 'origin/master' into master-next 2017-12-18 12:48:55 -08:00
Saleem Abdulrasool
33ada8e801 build: use C++14 for Windows builds
The Windows SDK headers require C++14 or newer features.  Visual Studio
is lax in enabling these features unlike clang.  Explicitly upgrade to
the higher standard for the Windows cross-compilation.
2017-12-12 16:27:26 -08:00
swift-ci
1270d9d356 Merge remote-tracking branch 'origin/master' into master-next 2017-12-09 14:49:49 -08:00
Saleem Abdulrasool
899103cfa8 COFF: restructure metadata registration
Restructure the COFF metadata handling to use the linker section
grouping to emit section start/stop markers in the appropriate location.
This allows us to lookup the sections statically without having to the
walk the entire image structure.

Introduce a constructor for PE/COFF binaries.  This will ensure that the
registration occurs for all modules appropriately.  This should resolve
rdar://problem/19045112.  The registration should occur prior to
`DllMain` being invoked from `DllMainCRTStartup`.
2017-12-08 16:15:07 -08:00
Bob Wilson
390058972a [master-next] Use PRIVATE in target_link_libraries for executables
This is needed to work with LLVM r319840.
2017-12-06 21:55:22 -08:00
Saleem Abdulrasool
d48686ff0d build: effectively revert 986beb7522
This change broke the Windows builds for all the variants.  `-z defs` cannot be
used on all targets, particularly in environments where the stdlib is being
compiled for a foreign host.  This needs to be handled more carefully as I
mentioned on the PR itself.  In the mean time, revert it to get Windows building
again.
2017-12-01 13:34:30 -08:00
Saleem Abdulrasool
bb762f62f3 build: use older means of getting the swiftrt object
This seems to be failing for some reason.  Fallback to the older way to
get the path to the object.  This should repair the build.
2017-11-30 12:25:49 -08:00