[cfe-dev] BUILD_SHARED_LIBS=True breaks some tests

Kim Gräsman via cfe-dev cfe-dev at lists.llvm.org
Wed Jan 9 12:34:45 PST 2019


On Wed, Jan 9, 2019 at 4:40 PM Joel E. Denny <jdenny.ornl at gmail.com> wrote:
>
> On Wed, Jan 9, 2019 at 1:59 AM Kim Gräsman <kim.grasman at gmail.com> wrote:
>>
>> Can you dig out more details around why it fails?
>
> Sure, here's the lit output for the first three:
>
> ```
> FAIL: Clang :: CXX/modules-ts/basic/basic.link/p2/module.cpp (1149 of 13760)
> ******************** TEST 'Clang :: CXX/modules-ts/basic/basic.link/p2/module.cpp' FAILED ********************
> Script:
> --
> : 'RUN: at line 1';   /home/jdenny/ornl/llvm-mono-git-build/bin/clang -cc1 -internal-isystem /home/jdenny/ornl/llvm-mono-git-build/lib/clang/8.0.0/include -nostdsysteminc -std=c++1z -fmodules-ts /home/jdenny/ornl/llvm-mono-git/clang/test/CXX/modules-ts/basic/basic.link/p2/module.cppm -emit-module-interface -o /home/jdenny/ornl/llvm-mono-git-build/tools/clang/test/CXX/modules-ts/basic/basic.link/p2/Output/module.cpp.tmp
> : 'RUN: at line 2';   /home/jdenny/ornl/llvm-mono-git-build/bin/clang -cc1 -internal-isystem /home/jdenny/ornl/llvm-mono-git-build/lib/clang/8.0.0/include -nostdsysteminc -std=c++1z -fmodules-ts -fmodule-file=/home/jdenny/ornl/llvm-mono-git-build/tools/clang/test/CXX/modules-ts/basic/basic.link/p2/Output/module.cpp.tmp /home/jdenny/ornl/llvm-mono-git/clang/test/CXX/modules-ts/basic/basic.link/p2/module.cpp -verify
> --
> Exit Code: 1
>
> Command Output (stderr):
> --
> error: 'error' diagnostics seen but not expected:
>   File /home/jdenny/ornl/llvm-mono-git/clang/test/CXX/modules-ts/basic/basic.link/p2/module.cpp Line 13: expected ';' after expression
>   File /home/jdenny/ornl/llvm-mono-git/clang/test/CXX/modules-ts/basic/basic.link/p2/module.cpp Line 13: use of undeclared identifier 'internal_linkage_class'
> 2 errors generated.

This doesn't make sense to me -- why would a shared build have
different runtime behavior from a static build? I was expecting a
symbol resolution failure of some kind, but this looks like the
compiler comes out broken somehow.

The IWYU build fails on a plain undefined reference:
https://github.com/include-what-you-use/include-what-you-use/pull/632#issuecomment-452011176

Not sure if these are at all related, but the PCH failures piqued my interest.

- Kim


More information about the cfe-dev mailing list