[flang-commits] [flang] [clang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

Fangrui Song via flang-commits flang-commits at lists.llvm.org
Sun Dec 10 20:56:10 PST 2023


================
@@ -1,15 +1,15 @@
-! Test that flang-new OpenMP and OpenMP offload related 
+! Test that flang OpenMP and OpenMP offload related 
 ! commands forward or expand to the appropriate commands 
-! for flang-new -fc1 as expected. Assumes a gfx90a, aarch64,
+! for flang -fc1 as expected. Assumes a gfx90a, aarch64,
 ! and sm_70 architecture, but doesn't require one to be 
 ! installed or compiled for, just testing the appropriate 
 ! generation of jobs are created with the correct 
 ! corresponding arguments.
 
 ! Test regular -fopenmp with no offload
 ! RUN: %flang -### -fopenmp %s 2>&1 | FileCheck --check-prefixes=CHECK-OPENMP %s
-! CHECK-OPENMP: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}}.f90"
-! CHECK-OPENMP-NOT: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" {{.*}}.f90"
+! CHECK-OPENMP: "{{[^"]*}}flang{{.*}}" "-fc1" {{.*}} "-fopenmp" {{.*}}.f90"
----------------
MaskRay wrote:

For clang driver, new tests are encouraged to just omit the string before `"-cc1"`. This makes the test more portable to build systems that make `clang` a symlink 

(
`-no-canonical-prefixes` instructs Clang to call `realpath` on the executable name and use the dereferenced absolute path for the `-cc1` command.
This path, either canonicalized by `realpath` or not, is used to derived the resource directory.
See <https://gcc.gnu.org/legacy-ml/gcc/2011-01/msg00429.html> for some background.

For most tests "-cc1" is sufficient to identify the command line, no need to specifically test the "clang" command, and `-no-canonical-prefixes` can be removed.
)

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


More information about the flang-commits mailing list