[clang] [clang][modules] Add warning for symlinks to modular headers (PR #188059)
Jake Egan via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 15 08:12:49 PDT 2026
jakeegan wrote:
Hi, this new test is failing on the AIX bot:
```
******************** TEST 'Clang :: Modules/symlink-to-modular-header.c' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 6
rm -rf /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp
# executed command: rm -rf /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp
# RUN: at line 7
split-file /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/llvm-project/clang/test/Modules/symlink-to-modular-header.c /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp
# executed command: split-file /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/llvm-project/clang/test/Modules/symlink-to-modular-header.c /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp
# RUN: at line 10
mkdir -p /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/covered /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/uncovered
# executed command: mkdir -p /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/covered /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/uncovered
# RUN: at line 11
ln -s /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/ModuleA/A.h /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/covered/A.h
# executed command: ln -s /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/ModuleA/A.h /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/covered/A.h
# RUN: at line 12
ln -s /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/ModuleA/A.h /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/uncovered/A.h
# executed command: ln -s /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/ModuleA/A.h /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/uncovered/A.h
# RUN: at line 15
/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/bin/clang -cc1 -internal-isystem /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/lib/clang/23/include -nostdsysteminc -fmodules -fimplicit-module-maps -I/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/covered -I/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/ModuleA -fmodules-cache-path=/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/cache -fsyntax-only /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/tu-covered.m -Wmmap-deprecated-symlink-to-modular-header -verify
# executed command: /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/bin/clang -cc1 -internal-isystem /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/lib/clang/23/include -nostdsysteminc -fmodules -fimplicit-module-maps -I/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/covered -I/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/ModuleA -fmodules-cache-path=/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/cache -fsyntax-only /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/tu-covered.m -Wmmap-deprecated-symlink-to-modular-header -verify
# RUN: at line 20
/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/bin/clang -cc1 -internal-isystem /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/lib/clang/23/include -nostdsysteminc -fmodules -fimplicit-module-maps -I/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/uncovered -I/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/ModuleA -fmodules-cache-path=/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/cache -fsyntax-only /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/tu-uncovered.m -Wmmap-deprecated-symlink-to-modular-header -verify
# executed command: /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/bin/clang -cc1 -internal-isystem /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/lib/clang/23/include -nostdsysteminc -fmodules -fimplicit-module-maps -I/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/uncovered -I/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/ModuleA -fmodules-cache-path=/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/cache -fsyntax-only /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/tu-uncovered.m -Wmmap-deprecated-symlink-to-modular-header -verify
# .---command stderr------------
# | module A {
# | header "A.h" { size 1 mtime 1775897115 }
# | }
# | error: 'expected-warning' diagnostics expected but not seen:
# | File * Line * (directive at /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/tu-uncovered.m:4): may be a symlink to '{{.*}}' owned by module 'A'
# | error: 'expected-note' diagnostics expected but not seen:
# | File /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/ModuleA/module.modulemap Line 1 (directive at /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-flang-ppc64-aix/build/tools/clang/test/Modules/Output/symlink-to-modular-header.c.tmp/tu-uncovered.m:5): module defined here
# | 2 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
https://github.com/llvm/llvm-project/pull/188059
More information about the cfe-commits
mailing list