77 Commits

Author SHA1 Message Date
Alexis Laferrière
901392896d [Frontend] Output the private module interface with the SPI info 2020-02-19 14:17:14 -08:00
Xi Ge
3a55c3c96e Front-end: teach the compiler to generate a .c file for $ld$add$os symbols.
When symbols are moved to this module, this module declares them as HIDE
for the OS versions prior to when the move happened. On the other hand, the
original module should declare ADD them for these OS versions. An executable
can choose the right library to link against depending on the deployment target.
This is a walk-around that linker directives cannot specify other install
name per symbol, we should eventually remove this.
2019-12-13 17:22:00 -08:00
David Ungar
742c3985bd Source-range-based dependencies
Frontend outputs source-as-compiled, and source-ranges file with function body ranges and ranges that were unparsed in secondaries.
Driver computes diffs for each source file. If diffs are in function bodies, only recompiles that one file. Else if diffs are in what another file did not parse, then the other file need not be rebuilt.
2019-11-12 20:41:02 -08:00
Xi Ge
3103b5cec1 Frontend: set up output file .swiftsourceinfo
This patch will focus on teaching driver and frontend to emit this file.
The actual content and de-serialization parts will come later.

More details: https://forums.swift.org/t/proposal-emitting-source-information-file-during-compilation/28794
2019-09-24 13:52:17 -07:00
Harlan Haskins
c82c9b8210 [ModuleInterfaces] Remove references to 'parseable' interfaces everywhere
Now that we've settled on Module Interface as the name, let's remove the
vestiges of "Parseable Interfaces"
2019-09-13 14:55:48 -07:00
Harlan Haskins
e5456984f7 [ModuleInterfaces] Remove 'parseable' from command-line flags
Leave the old flag in as an alias to the new flag, for transition
purposes. Also go ahead and remove the long-deprecated and unused
`emit-interface-path`.

Part of rdar://49359734
2019-04-11 18:05:09 -07:00
David Ungar
a09df8b705 Fix for rdar://48526524 - wrong module file output when given by two -o’s 2019-03-05 17:15:42 -08:00
Harlan Haskins
9f44e2cf4c [ParseableInterface] Add module arguments if using supplemental output maps
Currently, the check for whether to serialize parseable interface
arguments doesn't handle the case where a supplementary output file map
is used, preferring only to check if the frontend is passed
`-emit*interface`. Instead, check if the frontend inputs and outputs
contains a parseable interface, and use that to determine if we need to
save args.

This also puts `-module-link-name` in the parseable interface arg list.
2018-10-30 18:17:14 -07:00
Graydon Hoare
4f315363f8 [ModuleInterface] Change TY_SwiftModuleInterfaceFile to TY_SwiftParseableInterfaceFile 2018-10-11 23:56:19 -07:00
Jordan Rose
c38fcc1e96 [Driver] Expose -emit-parseable-module-interface[-path]
Commit to a command line option spelling so that build systems can
start testing it. I deliberately picked one of the longer names we
were considering because we can always decide to add a shorter alias,
but can't decide a shorter name was too generic.

Like the other supplementary output flags,
-emit-parseable-module-interface-path will emit a .swiftinterface file
to a particular path, while -emit-parseable-module-interface will put
it next to the main output (the one specified with -o).

rdar://problem/43776945
2018-10-04 17:50:04 -07:00
Jordan Rose
73d5ebaad2 Rename "textual interface" to "parseable interface" (#19713)
We already have something called "module interfaces" -- it's the
generated interface view that you can see in Xcode, the interface
that's meant for developers using a library. Of course, that's also a
textual format. To reduce confusion, rename the new module stability
feature to "parseable [module] interfaces".
2018-10-04 17:49:55 -07:00
Jordan Rose
e224e31720 Break almost all dependencies of Driver on Frontend
- Sink OutputFileMap{.h,.cpp} and ReferenceDependencyKeys.h to Basic
- Remove unnecessary includes of Frontend.h.
2018-08-27 20:47:58 -07:00
Jordan Rose
798496c488 Consistently get extensions from swift/Frontend/FileTypes.h
...instead of sometimes hardcoding them and sometimes using Strings.h.
The exceptions are the libraries that sit below Frontend; these can
continue using strings.
2018-07-25 21:49:01 -07:00
Jordan Rose
b9ae66d768 [Frontend] Add a new -emit-interface-path option
...but don't hook it up to anything yet.

This is the very very start of the module stability / textual
interfaces feature described at

  https://forums.swift.org/t/plan-for-module-stability/14551/

For now I've just made it a frontend option (not a driver option),
which is good enough for testing.
2018-07-20 16:40:51 -07:00
David Zarzycki
0f26cb7b40 [Frontend] NFC: Remove unused parameter 2018-04-30 16:38:32 -04:00
David Zarzycki
95473a10d7 [Misc] NFC: Fix random build warnings
Unused variables/methods, language extensions, extra semicolons, intentional
self assignment, platform specific quirks, etc.
2018-04-30 12:52:43 -04:00
Jordan Rose
02a2af60b3 [Frontend] Move the argument converter header files into lib/ (#15417)
...since they don't need to be accessed from other libraries. No
intended functionality change.
2018-03-25 16:01:23 -07:00
David Ungar
3376ca741d Add frontend check to ensure that all primaries are present in the supplementary output filemap. 2018-03-22 14:57:27 -07:00
David Ungar
807dd5864e Renamed swift::types to swift::file_types. 2018-03-22 08:40:06 -07:00
David Ungar
90773d298c Write out filemaps for supplementary outputs.
Add -driver-force-one-batch-repartition and enhance  batch_mode-overlong_argv test.
2018-03-20 09:42:13 -07:00
Jordan Rose
41286bc676 Make JSON fix-it outputs be per-primary in batch mode. (#14995)
This means moving the output path into SupplementaryOutputPaths, and
using the same sort of diagnostic dispatching that serialized
diagnostics use. This is part of what's needed to run the migrator
in batch mode.
2018-03-09 11:58:54 -08:00
Sho Ikeda
26d650292f [gardening] Use empty() over size() == 0 2018-03-05 14:43:13 +09:00
David Ungar
4866df6dfd Move SupplementaryOutputs into each InputFile. 2018-02-28 09:41:49 -08:00
David Ungar
ef02d0bfc0 Cleaner handling of cases where action produces no output or where there are no inputs. 2018-02-08 13:22:49 -08:00
David Ungar
ba4f2a84b4 Move supplementary outputs to SupplementaryOutputs in FrontendInputsAndOutputs. 2018-02-07 13:55:32 -08:00
David Ungar
6b1d16b68b Move comment to declaration. 2018-02-01 15:20:20 -08:00
David Ungar
614006bc4f Move main outputs to FrontendInputsAndOutputs and InputFile 2018-02-01 11:55:08 -08:00