[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 13 02:11:51 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGcafefe01604c: [compiler-rt] [test] [builtins] Pass the right parameters for linking with… (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147647/new/

https://reviews.llvm.org/D147647

Files:
  compiler-rt/test/builtins/Unit/lit.cfg.py


Index: compiler-rt/test/builtins/Unit/lit.cfg.py
===================================================================
--- compiler-rt/test/builtins/Unit/lit.cfg.py
+++ compiler-rt/test/builtins/Unit/lit.cfg.py
@@ -43,6 +43,13 @@
 elif config.host_os  == 'Darwin':
   base_lib = os.path.join(config.compiler_rt_libdir, "libclang_rt.osx.a ")
   config.substitutions.append( ("%librt ", base_lib + ' -lSystem ') )
+elif config.host_os  == 'Windows':
+  base_lib = os.path.join(config.compiler_rt_libdir, "libclang_rt.builtins%s.a"
+                          % config.target_suffix)
+  if sys.platform in ['win32'] and execute_external:
+    # 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 ') )
 else:
   base_lib = os.path.join(config.compiler_rt_libdir, "libclang_rt.builtins%s.a"
                           % config.target_suffix)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147647.513119.patch
Type: text/x-patch
Size: 1016 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230413/91630f10/attachment.bin>


More information about the llvm-commits mailing list