================
@@ -0,0 +1,57 @@
+// REQUIRES: lld
+
+/// Check DTLTO options are forwarded to the linker.
+
+/// Create a response file for all FileCheck invocations to share. These 
implicit
+/// checks ensure that all lines which mention DTLTO options are checked,
+/// and that no unexpected warnings appear.
+// RUN: echo " \"%/s\" --implicit-check-not=distributor \
+// RUN:   --implicit-check-not=remote-compiler \
+// RUN:   --implicit-check-not=warning:" > %t_f.rsp
+
+/// Create a response file to check that explicitly specified 
-Xthinlto-distributor
+/// options are forwarded correctly.
+// RUN: echo "-flto=thin \"%/s\" -### -fuse-ld=lld --target=x86_64-linux-gnu \
----------------
bd1976bris wrote:

`"%/s"` might need benefit from a bit of a detailed explanation. `%s` expands 
to Windows-style path separators on Windows hosts, and these are removed during 
the response file handling. `%/s` uses Linux-style separators that work on both 
platforms and survive in a response file. The surrounding double quotes are to 
guard against the case where there may be spaces in the expanded paths. See: 
https://github.com/llvm/llvm-project/pull/146749 for a similar case.

https://github.com/llvm/llvm-project/pull/147265
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to