Commit Graph

18 Commits

Author SHA1 Message Date
Erik Eckstein
6375647383 driver: add swift-frontend options to select the tool to run
Tool selection is primarily done by checking the executable (= symlink) name.
But sometimes (e.g. if the tool symlink is not there) it's useful to have an option for selecting the tool.
The selection option (e.g. -sil-opt) must be the first argument of swift-frontend.
2023-04-28 15:18:16 +02:00
Steven Wu
86927ef39c Merge pull request #65288 from cachemeifyoucan/eng/PR-swift-cache-backend
[CAS] Teach swift compiler to compute cache key and store outputs into CAS
2023-04-25 09:23:15 -07:00
Steven Wu
c153210505 [CAS] Add test case for cache key computation
Add tool swift-cache-tool for caching related testing and inspection.
2023-04-24 13:56:33 -07:00
Erik Eckstein
e7af73e2de Replace the swift-llvm-opt binary with a symlink to swift-frontend
rdar://76551283
2023-04-24 13:53:12 +02:00
Erik Eckstein
2b2bc45e08 Replace the swift-dependency-tool binary with a symlink to swift-frontend
rdar://76551283
2023-04-24 13:51:04 +02:00
Erik Eckstein
8ce6038a42 Replace the sil-passpipeline-dumper binary with a symlink to swift-frontend
rdar://76551283
2023-04-24 13:49:33 +02:00
Erik Eckstein
e3a174b85e Replace the sil-llvm-gen binary with a symlink to swift-frontend
rdar://76551283
2023-04-24 13:48:23 +02:00
Erik Eckstein
bc7b632d3e Replace the sil-nm binary with a symlink to swift-frontend
rdar://76551283
2023-04-24 13:47:13 +02:00
Erik Eckstein
b6132d10e5 Replace the sil-func-extractor binary with a symlink to swift-frontend
rdar://76551283
2023-04-24 13:45:22 +02:00
Erik Eckstein
2e9c241034 Replace the sil-opt binary with a symlink to swift-frontend
rdar://76551283
2023-04-24 13:44:04 +02:00
Erik Eckstein
ab1b343dad use new llvm::Optional API
`getValue` -> `value`
`getValueOr` -> `value_or`
`hasValue` -> `has_value`
`map` -> `transform`

The old API will be deprecated in the rebranch.
To avoid merge conflicts, use the new API already in the main branch.

rdar://102362022
2022-11-21 19:44:24 +01:00
Keith Smiley
eed76b416e Handle --driver-mode= when using new driver
Previously the driver mode was always set based on the executable name,
ignoring any manually passed flag, now this flag is preferred if it
exists.

Fixes https://github.com/apple/swift/issues/60600
2022-09-20 13:06:24 -07:00
YR Chen
a1df4bad6d [Driver] More robust way of finding subcommand path 2022-04-24 15:11:46 +08:00
YR Chen
029f0bc5c0 [Driver] Fix searching for SwiftDriver on Windows 2022-04-24 15:10:14 +08:00
Ashley Garland
8b916585e5 [Frontend] Forward intent to launch REPL to new driver
Now that the new driver no longer runs the REPL by default
when there are no arguments, the frontend needs to update
its assumption as it is still used to launch the new driver.

rdar://88595293
2022-02-17 12:22:00 -08:00
Tony Allevato
4c298581e6 Propagate response files correctly to the new driver.
If a response file is being passed to the legacy driver
because it is too large to fit on the system's command line,
then it should also be passed when spawning the new driver.
Currently, however, the legacy driver attempts to pass the
*expanded* arguments to the new driver, which can cause the
invocation to fail, requiring the new driver to be disabled
in order to compile.

This change passes the original arguments into `run_driver`
as well as the expanded ones, so that the branch that spawns
the new driver can use the original arguments instead.
2022-02-04 15:33:40 -08:00
Erik Eckstein
3540c01125 rename initializeLibSwift -> InitializeSwiftModules
and some updates in comments.
2021-12-22 11:31:52 +01:00
Xi Ge
515cf21ba3 driver: refactor driver tool logics into a library. NFC 2021-07-13 10:03:12 -07:00