This re-applies r13380, reverted in r13406. I don't think this actually
caused any harm (r13400 was the primary culprit), but if it did I'd
like to actually see the buildbots or someone else's machine fail on it.
Swift SVN r13456
This substitutes swift_driver in as the new "swift". Tests that currently
test "%swift" will invoke "swift -frontend", much like "clang -cc1".
Most command-line interaction will look the same, except that Swift can
now emit linked libraries (using -emit-library) and executables (using
-emit-executable, or by not passing a mode option at all).
If you are working with @transparent functions, note that they will not be
properly inlined across file boundaries unless you use
-force-single-frontend-invocation, which emulates the old swift binary.
There are Radars for this already: <rdar://problem/15366167&15693042>
The name 'swift_driver' is now a symlink for 'swift'. This will be removed
next week.
The old 'swift' is still available as 'swift_old', though it is not being
tested at all. This will be removed in two weeks.
Clean CMake builds will get this immediately.
Incremental CMake builds will not get the new driver unless you explicitly
enable the SWIFT_NEW_DRIVER option (-DSWIFT_NEW_DRIVER=ON on the command line).
This option will go away in a week.
Makefile builds will get this immediately because I didn't want to work out
how to maintain both modes.
Much credit to Connor for bringing up the entire driver and for doing much
of the work in ensuring that all the tests continue to pass.
Swift SVN r13380
If there's no script-mode file in a module, don't produce a top_level_code SILFunction for it, and don't consider emitting an LLVM global_ctor for it. We should never emit static constructors from user code anymore.
Swift SVN r11644
The hack to get the LLVM build system to do what we want is to define a
custom build rule for "XYZ.o" and then add "XYZ" as a dummy source file
to the SOURCES variable, which the LLVM Makefile system uses. To make it
clear that something unusual is going on here, I've changed all existing
instances of this to use "XYZ.o" in SOURCES, rather than having that name
be derived from "XYZ.swift" or whatever.
The actual Swift source files go in SWIFT_SOURCES for the time being
(and possibly forever, since Swift sources will always be built together).
Swift SVN r11058
...rather than as a separate step. This avoids duplicating Parse and Sema
work for these. (This is the new and correct version of r7377.)
Also, remove leftover code for building "swift.swift" and friends in lieu
of proper modules. We're not going back to those days. :-)
Swift SVN r7420