Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler-rt/test/lit.common.configured.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ set_default("gold_executable", "@GOLD_EXECUTABLE@")
set_default("clang", "@COMPILER_RT_RESOLVED_TEST_COMPILER@")
set_default("compiler_id", "@COMPILER_RT_TEST_COMPILER_ID@")
set_default("python_executable", "@Python3_EXECUTABLE@")
set_default("python_root_dir", "@Python3_ROOT_DIR@")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change in compiler-rt necessary?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not. I just checked by rerunning the tests without that setting. I thought this would set the default value for python_root_dir globally to all lit tests but this is not the case.

I will open a PR on upstream to remove it and cherry-pick it back to this PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR opened: llvm#143738

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed 👍
Should I squash the commits?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not if they are cherry-picks.

set_default("compiler_rt_debug", @COMPILER_RT_DEBUG_PYBOOL@)
set_default("compiler_rt_intercept_libdispatch", @COMPILER_RT_INTERCEPT_LIBDISPATCH_PYBOOL@)
set_default("compiler_rt_output_dir", "@COMPILER_RT_RESOLVED_OUTPUT_DIR@")
Expand Down
5 changes: 5 additions & 0 deletions lldb/test/Shell/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,8 @@ def calculate_arch_features(arch_string):
config.available_features.add("ld_new-bug")
except:
pass

# Some shell tests dynamically link with python.dll and need to know the
# location of the Python libraries. This ensures that we use the same
# version of Python that was used to build lldb to run our tests.
config.environment["PYTHONHOME"] = config.python_root_dir
1 change: 1 addition & 0 deletions lldb/test/Shell/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ config.python_executable = "@Python3_EXECUTABLE@"
config.swiftc = "@LLDB_SWIFTC@"
config.swift_libs_dir = '@LLDB_SWIFT_LIBS@'
config.lldb_enable_swift = @LLDB_ENABLE_SWIFT_SUPPORT@
config.python_root_dir = "@Python3_ROOT_DIR@"
config.have_zlib = @LLVM_ENABLE_ZLIB@
config.objc_gnustep_dir = "@LLDB_TEST_OBJC_GNUSTEP_DIR@"
config.lldb_enable_lzma = @LLDB_ENABLE_LZMA@
Expand Down
1 change: 1 addition & 0 deletions lldb/test/Unit/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
]
)
llvm_config.with_environment("PATH", os.path.dirname(sys.executable), append_path=True)
config.environment["PYTHONHOME"] = config.python_root_dir

# Enable sanitizer runtime flags.
config.environment["ASAN_OPTIONS"] = "detect_stack_use_after_return=1"
Expand Down
1 change: 1 addition & 0 deletions lldb/test/Unit/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ config.lldb_obj_root = "@LLDB_BINARY_DIR@"
config.lldb_src_root = "@LLDB_SOURCE_DIR@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
config.python_root_dir = "@Python3_ROOT_DIR@"

import lit.llvm
lit.llvm.initialize(lit_config, config)
Expand Down