[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 13 04:53:42 PDT 2024


=?utf-8?q?IƱaki?= Amatria Barral <inaki.amatria at appentra.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/94544 at github.com>


================
@@ -17,10 +17,6 @@
 // GCNO-LOCATION: "-coverage-notes-file={{.*}}/foo/bar.gcno"
 // GCNO-LOCATION-REL: "-coverage-notes-file={{.*}}{{/|\\\\}}foo/bar.gcno"
 
-/// GCC allows PWD to change the paths.
-// RUN: %if system-linux %{ PWD=/proc/self/cwd %clang -### -c --coverage %s -o foo/bar.o 2>&1 | FileCheck --check-prefix=PWD %s %}
-// PWD: "-coverage-notes-file=/proc/self/cwd/foo/bar.gcno" "-coverage-data-file=/proc/self/cwd/foo/bar.gcda"
----------------
AaronBallman wrote:

We should not be regressing Clang behavior like this -- at least not without wider buy-in from the Clang community via an RFC. I worry that this change will silently break build scripts relying on the current PWD behavior being consistent between Clang and GCC.

https://github.com/llvm/llvm-project/pull/94544


More information about the cfe-commits mailing list