[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 23 13:09:46 PDT 2025
================
@@ -0,0 +1,77 @@
+// RUN: %clang -### %s --target=i686-pc-windows-cygnus --sysroot=%S/Inputs/basic_cygwin_tree \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --stdlib=platform 2>&1 | FileCheck --check-prefix=CHECK %s
+// CHECK: "-cc1"
+// CHECK-SAME: "-resource-dir" "[[RESOURCE:[^"]+]]"
+// CHECK-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-pc-cygwin/10/../../../../include/c++/10"
+// CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-pc-cygwin/10/../../../../include/i686-pc-cygwin/c++/10"
+// CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-pc-cygwin/10/../../../../include/c++/10/backward"
+// CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/local/include"
+// CHECK-SAME: {{^}} "-internal-isystem" "[[RESOURCE]]{{(/|\\\\)}}include"
+// CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-pc-cygwin/10/../../../../i686-pc-cygwin/include"
+// CHECK-SAME: "-internal-externc-isystem" "[[SYSROOT]]/include"
+// CHECK-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
+// CHECK-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/usr/include/w32api"
+// CHECK-SAME: "-femulated-tls"
+// CHECK-SAME: "-exception-model=dwarf"
+// CHECK: "{{.*}}gcc{{(\.exe)?}}"
+// CHECK-SAME: "-m32"
+
+// RUN: %clang -### %s --target=i686-pc-cygwin --sysroot=%S/Inputs/basic_cygwin_tree \
+// RUN: --stdlib=platform -static 2>&1 | FileCheck --check-prefix=CHECK-STATIC %s
+// CHECK-STATIC: "-cc1" "-triple" "i686-pc-windows-cygnus"
+// CHECK-STATIC-SAME: "-static-define"
+// CHECK-STATIC: "{{.*}}gcc{{(\.exe)?}}"
----------------
mstorsjo wrote:
Does this mean that we invoke `gcc` to drive the linking? I guess that's what's being done now before this change as well (and the fewer changes in this PR, the better); but I guess that's a nice to have for future changes as well, to be able to call the linker directly without involving gcc inbetween?
https://github.com/llvm/llvm-project/pull/135691
More information about the cfe-commits
mailing list