[PATCH] D147647: [compiler-rt] [test] [builtins] Pass the right parameters for linking with -nodefaultlibs on mingw targets
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 03:05:01 PDT 2023
mstorsjo added inline comments.
================
Comment at: compiler-rt/test/builtins/Unit/lit.cfg.py:51
+ # Don't pass dosish path separator to msys bash.exe.
+ base_lib = base_lib.replace('\\', '/')
+ config.substitutions.append( ("%librt ", base_lib + ' -lmingw32 -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 ') )
----------------
alvinhochun wrote:
> Just wondering is this really needed? I had assumed that the lit test runner handles passing paths with backslashes just fine. Though I guess there is no harm in replacing them with forward slashes.
See the top of the file, lines 8-17 - the user may ask to run the tests via bash instead of with lit's internal executor.
I guess the `sys.platform in ['win32']` might be somehwat redundant here though - as these scripts don't really seem to be ready for cross testing anyway. (libcxx/libcxxabi/libunwind's test setup do support cross testing though.) But I'm keeping the style consistent with the other cases anyway.
I'm not sure what `config.host_os` refers to here - is it specifically the cross target OS, or the host running the testsuite? E.g. the asan tests use specifically the target triple, which should be unambiguous, and `sys.platform` also is unambiguously the host that is executing the python script.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147647/new/
https://reviews.llvm.org/D147647
More information about the llvm-commits
mailing list