bdf60152f0 added some extra padding to
forFilelistCapture to avoid it being exactly 4096 bytes, triggering a
tail bug. Rather than do that, just run the sed's first so that the
input is quite small (definitely under 4096 bytes).
Resolves rdar://105395733.
Ensure that we link `swift_CompilerPluginSupport` into the compiler and
SourceKit, and set the rpath appropriately to find the library in its
installed location.
A number of driver tests copy the driver executable into a temporary
directory to isolate it from the build tree. Also copy the plugin
support library into its appropriate place near the driver executable
to ensure these tests keep working. To help with this, add a
`swift_swift_parser` lit feature, which we can use in tests that
involve the new parser's capabilities.
Various clients still use the old driver to convert a driver arguments to frontend arguments. This has to work when given new driver arguments, ie. not fail with an unknown argument error.
Move all "extra options" from the new driver into `Options.td` and mark them as new driver only.
Fixes#60406
Ran the linux x86_64 compiler validation suite on this pull with `-use-ld=lld -Xlinker --gc-sections`, then without stripping as in the linked issue, and only saw the 20 unrelated failures just like @drodriguez had.
This is important for performance diagnostics: it’s assumed that (non-generic) MemoryLayout constants do not need to create metadata at runtime. At Onone this is only guaranteed if the TargetConstantFolding pass runs.
rdar://94836837
`test/Driver/filelists.swift` writes out the swift driver jobs to a file
called `%t/forFilelistCapture`. We then `tail -2 | head -1` that file to
get the first line, run some seds, and expect that to the output file
list (eg. from the swift-frontend command). Unfortunately if that file
happens to end up being 4096 in length, `tail` skips the first line and
thus the seds run on *second* line. That produces `/usr/bin/ld` instead,
which obviously doesn't contain the output files!
Add a comment to the end of the file so that it's unlikely to be 4096
in length. Technically we could still hit it if we removed a bunch of
arguments, but this is fine until that bug is fixed.
`-use-ld=lld` and `-static-stdlib` combination is now brokwn due to
duplicate symbous for unicode properties impls between stdlib and
StringProcessing library, which is recently defaulted.
`-use-ld=lld` and `-static-stdlib` combination is now brokwn due to
duplicate symbous for unicode properties impls between stdlib and
StringProcessing library, which is recently defaulted.
- #58975 switched many tests from XFAIL on linux to linux-gnu, so seven
fail on the Android CI and two natively. They are now explicitly excluded.
- #39605 added several C++ Interop tests, 11 of which fail on the Android CI,
so disable them for now.
- #42478 removed the @noescape attribute for the non-Android
SIL/clang-function-types tests, so I remove it for Android too.
- My pull #40779 moved the Swift pointer tags to the second byte, so
SILOptimizer/concat_string_literals.64 will need to be updated for that,
disabled it for now.
- Compiler-rt moved the directory in which it places those libraries for
Android, llvm/llvm-project@a68ccba, so lit.cfg is updated for that.
lit.py currently allows any substring of `target_triple` to be used as a
feature in REQUIRES/UNSUPPORTED/XFAIL. This results in various forms of
the OS spread across the tests and is also somewhat confusing since they
aren't actually listed in the available features.
Modify all OS-related features to use the `OS=` version that Swift adds
instead. We can later remove `config.target_triple` so that these don't
the non-OS versions don't work in the first place.
The `__future__` we relied on is now, where the 3 specific things are
all included [since Python 3.0](https://docs.python.org/3/library/__future__.html):
* absolute_import
* print_function
* unicode_literals
* division
These import statements are no-ops and are no longer necessary.
- Add driver and frontend option
- Add LangOptions entry
- Ensure driver propagates flag to frontends
- Add feature to `features.json`
Part of rdar://91119995
This change removes the -emit-cxx-header option, and adds a new -emit-clang-header-path option instead. It's aliased to -emit-objc-header-path for now, but in the future, -emit-objc-header-path will alias to it. After this change Swift can start emitting a single header file that can be expose declarations to C, Objective-C, or C++. For now C++ interface is generated (for all public decls) only when -enable-cxx-interop flag is passed, but that behavior will change once attribute is supported.
This patch adds a new Darwin Swift driver environment variable in the spirit of
RC_DEBUG_OPTIONS, called RC_DEBUG_PREFIX_MAP, which allows a meta build tool to
add one additional -fdebug-prefix-map entry without the knowledge of the build
system.
See also https://reviews.llvm.org/D119850
rdar://85224717
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.
Ensure that we only have one writer to the module trace file at a time by using LLVM's `LockFileManager` utilities, similarly to `ModuleInterfaceBuilder`
Resolves rdar://76743462
Clang enforces a minimum 13.1 deployment target. The driver, API
checker, and various tests assume 13.0 is a valid minimum. Update these
to reflect the actual 13.1 minimum.
Resolves rdar://84177900