diff options
author | Vladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com> | 2024-04-17 05:17:07 +0000 |
---|---|---|
committer | Vladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com> | 2024-05-31 17:24:14 +0200 |
commit | 5e423f1c5119387879c04069f048d6dbfc2c90d6 (patch) | |
tree | 09c6e71e4a2aaaf9ba9a986d4cd958d63c7071a9 /lldb/packages/Python/lldbsuite/test/dotest.py | |
parent | e6bef08e22ac52aca0d6364f972cfb49c483adb3 (diff) | |
download | llvm-5e423f1c5119387879c04069f048d6dbfc2c90d6.zip llvm-5e423f1c5119387879c04069f048d6dbfc2c90d6.tar.gz llvm-5e423f1c5119387879c04069f048d6dbfc2c90d6.tar.bz2 |
[lldb][test] Add --sysroot argument to dotest.py
This argument allows to set specific sysroot pass which will be used for
building LLDB API test programs.
It might come in handy for setting up cross-platform remote runs of API
tests on Windows host.
It can be useful for cross-compiling LLDB API tests. The argument can be
set using `LLDB_TEST_USER_ARGS` argument:
```
cmake ...
-DLLDB_TEST_USER_ARGS="...;--sysroot;C:\path\to\sysroot;..."
...
```
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 2e537e3..70bc1d8 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -304,7 +304,9 @@ def parseOptionsAndInitTestdirs(): lldbtest_config.out_of_tree_debugserver = args.out_of_tree_debugserver # Set SDKROOT if we are using an Apple SDK - if platform_system == "Darwin" and args.apple_sdk: + if args.sysroot is not None: + configuration.sdkroot = args.sysroot + elif platform_system == "Darwin" and args.apple_sdk: configuration.sdkroot = seven.get_command_output( 'xcrun --sdk "%s" --show-sdk-path 2> /dev/null' % (args.apple_sdk) ) |