Commit Graph

456 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis
0135e01d02 Rename the swift-format utility to swift-indent
This is to distinguish the C++ indenting functionality from the new formatter that is written in Swift.
2019-07-26 11:40:54 -07:00
Luciano Almeida
c69d754758 Removing trailing. 2019-07-18 23:25:46 -03:00
Luciano Almeida
cfd882cfb6 Place back validate header. 2019-07-18 23:24:24 -03:00
Luciano Almeida
ba597a02b9 Refactoring validate Deployment targets to darwing toolchain validation 2019-07-18 23:20:58 -03:00
Jordan Rose
419e97d7db Merge pull request #26136 from LucianoPAlmeida/patch-sr11015
[Driver] DarwinToolChain should explicitly reject -static-stdlib
2019-07-16 08:55:25 -07:00
Luciano Almeida
53917874dd Adding todo. 2019-07-15 22:35:51 -03:00
Luciano Almeida
c95f28c9dc Moving -static-stdlib validation to Darwin toolchain. 2019-07-15 21:02:39 -03:00
Luciano Almeida
1983e15ef2 Validate -static-stdlib on Driver::validate args and removing handles on Darwing toolchain 2019-07-14 22:22:13 -03:00
Harlan Haskins
21bd24a150 Revert "[Driver] Load the standard library before starting parallel frontend invocations"
This failed the source compat suite, it seems we need more driver
changes for this.
2019-07-12 21:38:23 -07:00
Harlan Haskins
7022110a05 [Driver] Load the standard library before starting parallel frontend invocations
Add a new action, LoadModuleJobAction, that the driver can use to schedule a
load of a given module before we fan out and invoke the frontend multiple
times. This gives the module interface loader a chance to compile it from a
module interface before we start with parallel invocations, avoiding starting
potentially dozens of redundant compiles of a large module. Start by using this
on the standard library.

Quick fix for rdar://52839445
2019-07-12 14:53:25 -07:00
Aasim Kandrikar
6328322eea [Driver] Add warning when using -F and path ends in ".framework"
This commit also includes cases where user uses -Fsystem and when path
ends in ".framework/"

(cherry picked from commit a5d9750a9d25441517f3bec97488f57d1bb4b03f)
2019-07-01 22:14:14 +05:30
Thomas Roughton
e5ea42d774 Driver: renamic LinkJob to DynamicLinkJob and ArchiveJob to StaticLinkJob
# Conflicts:
#	lib/Driver/DarwinToolChains.cpp
2019-06-17 12:49:17 +12:00
Thomas Roughton
b34a1cbbc6 Driver: add -static flag for generating static archives 2019-06-17 12:49:03 +12:00
Jordan Rose
6b87e97ca1 [Driver] Bump the required Apple SDK versions to the 2019 OSs (#25469)
rdar://problem/50779459
2019-06-14 11:48:50 -07:00
Kelly Hutchison
78802be3e0 SR-20 Update swift --help to explain multitool support ("swift build", etc.) 2019-06-07 17:51:14 -07:00
Saleem Abdulrasool
7514adf66a Driver: introduce new -libc option for Windows
On Windows, there are multiple variants of the C runtime that must be
explicitly specified and consistently used from the runtime to the
application.  The new `-libc` option allows us to control the linking
phase by correctly embedding the requested library to be linked.  It is
made into a required parameter on Windows and will add in the
appropriate flags for the imported C headers as well.  This ensures that
the C library is not incorrectly linked.
2019-05-16 21:01:47 -07:00
Harlan Haskins
ea7e7e918f [ModuleInterface] Remove 'parseable interface' from diagnostics
Part of rdar://49359734
2019-04-11 18:05:09 -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
Saleem Abdulrasool
1cb57b6fc2 Driver: perform the ModuleWrap job for COFF
The ModuleWrap job is responsible for wrapping the AST into the swift
module.  It was only enabled for ELF objects, but COFF needs this
operation to be performed as well.  Enable this for the COFF targets as
well.  This is needed to fix the DebugInfo AST Section verification.
2019-03-22 12:45:50 -07:00
Jason Mittertreiner
9eeabc9875 Allow Arguments in -driver-use-frontend-path (#22596)
Windows doesn't know what a shebang is, so it's unable to run tests that
use -driver-use-frontend-path with a script. This allows the script
interpreter to be run as the executable with the script as its first
argument. e.g. --driver-use-frontend-path "python;my-script.py"
2019-02-20 11:20:21 -08:00
David Ungar
76629f1307 Format 2019-01-30 17:21:44 -08:00
David Ungar
b82694c307 Format 2019-01-30 17:19:56 -08:00
David Ungar
2f65ac3735 Cosmetic cleanups 2019-01-30 17:16:49 -08:00
David Ungar
3d8779efba Fix print bugs unfmt 2019-01-26 21:47:52 -08:00
David Ungar
b520b242dc Collapsed lots of changes. 2019-01-24 18:46:49 -08:00
Adrian Prantl
ff63eaea6f Remove \brief commands from doxygen comments.
We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by

      for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
2018-12-04 15:45:04 -08:00
Vinicius Vendramini
e1a968c05c Send OPT_dump_ast closer to other similar options. 2018-11-14 13:38:01 -02:00
Vinicius Vendramini
e123750c12 Add option to dump AST to files
This adds two things:
- Calling `swiftc -dump-ast foo.swift [...] -o foo.ast` will dump the AST to the file `foo.ast`, instead of dumping it to `stderr` as usual.
- Calling `swiftc -dump-ast -output-file-map=outputFileMap.json *.swift [...]`, given an `outputFileMap.json` file that contains entries in the form `"ast-dump": "foo.ast"`, will dump the ASTs of the input files to their respective output files in the file map.

This should serve as a valid workaround to a bug mentioned in [the forums](https://forums.swift.org/t/error-when-dumping-the-ast-for-hundreds-of-files/17578) where the AST dump functionality crashes when called with too many input files. A few implementation details were also discussed in the same forum post.

As an aside, this also fixes a comment in `include/swift/Basic/PrimarySpecificPaths.h` that was incorrect.
2018-11-14 13:38:01 -02:00
Dave Lee
0829b8a4b5 [Driver] Remove unused OutputFileMap param (#20349) 2018-11-06 10:45:17 -08:00
Graydon Hoare
4938b002b4 [ModuleInterface] Remove SwiftParseableInterfaceDeps files, use INPUT_BLOCK. 2018-11-01 10:51:16 -07:00
David Ungar
1f4dfce598 Add -enable-experimental-dependencies and push it through. 2018-10-28 00:39:36 -07:00
Graydon Hoare
dc006e883a [ModuleInterface] Add new SwiftParseableInterfaceDeps file type (.sid). 2018-10-18 00:31:24 -07:00
Graydon Hoare
4f315363f8 [ModuleInterface] Change TY_SwiftModuleInterfaceFile to TY_SwiftParseableInterfaceFile 2018-10-11 23:56:19 -07:00
Graydon Hoare
0f26b9c12d [Driver] <rdar://43955209> Remove obsolete/fragile batch mode 'repartitioning' code. 2018-10-09 13:31:41 -07:00
Jordan Rose
45557ee2f6 [Driver] Disallow emitting swiftinterfaces with bridging headers
There's no place to put the bridging header in a swiftinterface, and
they don't make sense with the intended use case of distribution.
Just disallow it up front.

rdar://problem/44113493
2018-10-04 18:02:09 -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
ac4a92a968 Merge pull request #19292 from jrose-apple/get-out-the-map
Minor improvements to the use of StringMap/StringSet
2018-09-14 10:52:59 -07:00
Saleem Abdulrasool
4baa775726 Merge pull request #19297 from compnerd/unreachable
litter the tree with `llvm_unreachable`
2018-09-14 09:04:56 -07:00
Graydon Hoare
5a563f59af [Stats] Add SWIFTC_MAXIMUM_DETERMINISM to inhibit parallelism everywhere. 2018-09-13 16:15:49 -07:00
Saleem Abdulrasool
d281b98220 litter the tree with llvm_unreachable
This silences the instances of the warning from Visual Studio about not all
codepaths returning a value.  This makes the output more readable and less
likely to lose useful warnings.  NFC.
2018-09-13 15:26:14 -07:00
Jordan Rose
71760bcc4e Replace StringMap with DenseMap when the keys don't need to be owned
StringMap always copies its strings into its own storage. A DenseMap
of StringRefs has the same caveats as any other use of StringRef, but
in the cases I've changed the string has very clear ownership that
outlives the map.

No functionality change, but should reduce memory usage and malloc
traffic a little.
2018-09-13 15:15:27 -07:00
Jordan Rose
6ffe644cfc Merge pull request #18973 from jrose-apple/interfacepalm
Generate swiftinterface files next to the stdlib swiftmodules, for testing purposes.
2018-08-28 14:56:02 -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
845e8bef5f [Driver] Add -experimental-emit-interface for textual interfaces
This will eventually become plain old -emit-interface, but we don't
want people to be using it just yet. This is just for testing.
2018-08-24 18:02:48 -07:00
Jordan Rose
4d9b85b670 [Driver] Drop redundant arguments in various helper functions
The OutputInfo, ToolChain, and Triple can all be retrieved from the
Compilation, so now that we're passing one of those around we don't
need to pass the others explicitly.

No functionality change.
2018-08-24 18:02:48 -07:00
swift-ci
c648e2d214 Merge remote-tracking branch 'origin/master' into master-next 2018-07-31 08:50:06 -07:00
Graydon Hoare
ff88c7f369 Merge pull request #18362 from graydon/rdar-41271283-batch-mode-limit-memory-pressure-on-large-modules
[BatchMode] <rdar://41271283> Limit memory pressure on large modules.
2018-07-31 08:46:35 -07:00
swift-ci
f7b8996498 Merge remote-tracking branch 'origin/master' into master-next 2018-07-30 20:59:23 -07:00
Slava Pestov
b15c9d7129 Implement a -dump-type-info frontend action 2018-07-30 18:38:47 -07:00