[flang-commits] [clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

via flang-commits flang-commits at lists.llvm.org
Wed Jun 26 11:14:30 PDT 2024


dpalermo wrote:

This patch breaks the build of flang when quad math support is enabled (https://github.com/llvm/llvm-project/pull/81971).   Quad math support is off by default (why no buildbot tripper over this), and can be enabled by setting the following cmake variable:

-DFLANG_RUNTIME_F128_MATH_LIB=libquadmath

With this patch applied, all libquadmath symbols cannot be found during the build: cosq, acoshq, ... 
```
FAILED: lib/libFortranFloat128Math.so.19.0git
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-init
ializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-ov
erride -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-strict-aliasing -fno-semantic-interposition -fno-lt
o -O3 -DNDEBUG -fno-semantic-interposition  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/work1/omp-nightly/build/git/trunk19.0/build/llvm-project/./lib  -Wl,--gc-sections -shared -Wl,-soname,libFortranFloat1
28Math.so.19.0git -o lib/libFortranFloat128Math.so.19.0git tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/acos.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math
.dir/acosh.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/asin.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/asinh.cpp.o tools/flang/runtime/Float
128Math/CMakeFiles/obj.FortranFloat128Math.dir/atan.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/atan2.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math
.dir/atanh.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/ceil.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/complex-math.c.o tools/flang/runtime/
Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/cos.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/cosh.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128M
ath.dir/erf.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/erfc.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/exp.cpp.o tools/flang/runtime/Float1
28Math/CMakeFiles/obj.FortranFloat128Math.dir/exponent.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/floor.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128M
ath.dir/fma.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/fraction.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/hypot.cpp.o tools/flang/runtime/
Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/j0.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/j1.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math
.dir/jn.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/lgamma.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/llround.cpp.o tools/flang/runtime/Floa
t128Math/CMakeFiles/obj.FortranFloat128Math.dir/log.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/log10.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math
.dir/lround.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/mod-real.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/modulo-real.cpp.o tools/flang/ru
ntime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/nearest.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/norm2.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.Fortr
anFloat128Math.dir/pow.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/random.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/round.cpp.o tools/flang
/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/rrspacing.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/scale.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.
FortranFloat128Math.dir/set-exponent.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/sin.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/sinh.cpp.o t
ools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/spacing.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/sqrt.cpp.o tools/flang/runtime/Float128Math/CMakeFil
es/obj.FortranFloat128Math.dir/tan.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/tanh.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/tgamma.cpp.o
tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/trunc.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/y0.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/
obj.FortranFloat128Math.dir/y1.cpp.o tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/yn.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:" && :
/usr/bin/ld: tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/acos.cpp.o: in function `_FortranAAcosF128':
acos.cpp:(.text._FortranAAcosF128+0x5): undefined reference to `acosq'
/usr/bin/ld: tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/acosh.cpp.o: in function `_FortranAAcoshF128':
acosh.cpp:(.text._FortranAAcoshF128+0x5): undefined reference to `acoshq'
/usr/bin/ld: tools/flang/runtime/Float128Math/CMakeFiles/obj.FortranFloat128Math.dir/asin.cpp.o: in function `_FortranAAsinF128':
asin.cpp:(.text._FortranAAsinF128+0x5): undefined reference to `asinq'
...
```


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


More information about the flang-commits mailing list