-
Notifications
You must be signed in to change notification settings - Fork 353
[lldb][test] Add CMake option for extra Swift driver flags in shell tests #11785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stable/21.x
Are you sure you want to change the base?
[lldb][test] Add CMake option for extra Swift driver flags in shell tests #11785
Conversation
|
@swift-ci please test |
| @@ -24,6 +24,8 @@ config.python_executable = "@Python3_EXECUTABLE@" | |||
| config.python_root_dir = "@Python3_ROOT_DIR@" | |||
| config.swiftc = "@LLDB_SWIFTC@" | |||
| config.swift_libs_dir = '@LLDB_SWIFT_LIBS@' | |||
| _swift_driver_flags = lit_config.substitute("@LLDB_SWIFT_DRIVER_EXTRA_FLAGS@") | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mark all Swift-specific additions in generic code with
# BEGIN SWIFT
...
# END SWIFT
This makes resolving merge conflicts much easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I realize this file isn't doing that, but let's add it now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| @@ -273,6 +271,9 @@ llvm_canonicalize_cmake_booleans( | |||
| llvm_canonicalize_cmake_booleans( | |||
| LLDB_ENABLE_SWIFT_SUPPORT | |||
| ) | |||
|
|
|||
| set(LLDB_SWIFT_DRIVER_EXTRA_FLAGS "" CACHE STRING | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is meant to affect how tests are built, the more idiomatic way would be to use LLDB_TEST_USER_ARGS. The https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-matrix bot uses that creatively to run the LLDB testsuite against different compilers and debug info options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was very excited about this, but unfortunately it seems like this only applies to API tests and the issue applies to shell tests.
|
I'm also generally confused about the exact use-case for this. When talking to @compnerd today, I came away with the impression that on Windows |
No, the |
Maybe the Windows build works differently, but on other platforms the standard library is built as a dependency of LLDB and its location is the Swift compiler's build dir (which should be LLDB's build dir in a unified build) + |
Windows has generally been the platform that has been pushing the build to a more structured place. The Windows build does not build the standard library as part of the toolchain. The distributed runtime cannot be tested with a version of the runtime that can be built into the same build tree as that build cannot be built in a similar configuration. |
Tests that invoke
swiftcurrently fail on Windows because we're not passing-sdk. Unlike Darwin, there's no way to figure out a good value for this at runtime.This change adds a CMake variable
LLDB_SWIFT_DRIVER_EXTRA_FLAGSwhich takes a semicolon-separated list of arguments for the Swift driver which we pipe into the lit config.