aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorMosè Giordano <mose@gnu.org>2024-08-13 18:22:11 +0200
committerGitHub <noreply@github.com>2024-08-13 09:22:11 -0700
commit248e88523518ae66a20d02bd3636cd0a15453958 (patch)
tree09d110f29cda7dcb453febaf2504be8e27d56b57 /llvm/lib/IR/Module.cpp
parent277ca48f2f2ab78290c0702d45b6db54a32c99cf (diff)
downloadllvm-248e88523518ae66a20d02bd3636cd0a15453958.zip
llvm-248e88523518ae66a20d02bd3636cd0a15453958.tar.gz
llvm-248e88523518ae66a20d02bd3636cd0a15453958.tar.bz2
[compiler-rt] Define `__STDC_FORMAT_MACROS` to ensure `PRId64` is available (#102980)
In https://github.com/JuliaPackaging/Yggdrasil/pull/9246#issuecomment-2284894139 we ran into ``` [20:54:03] [ 65%] Building CXX object lib/scudo/standalone/CMakeFiles/RTScudoStandalone.x86_64.dir/timing.cpp.o [20:54:03] cd /workspace/srcdir/compiler-rt-17.0.6.src/build/lib/scudo/standalone && /opt/bin/x86_64-linux-gnu-libgfortran5-cxx11/x86_64-linux-gnu-g++ --sysroot=/opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/ -I/workspace/srcdir/compiler-rt-17.0.6.src/lib/scudo/standalone/../.. -I/workspace/srcdir/compiler-rt-17.0.6.src/lib/scudo/standalone/include -Wall -Wno-unused-parameter -O3 -DNDEBUG -m64 -Werror=conversion -Wall -Wextra -pedantic -g -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-pedantic -fno-lto -O3 -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -std=c++17 -MD -MT lib/scudo/standalone/CMakeFiles/RTScudoStandalone.x86_64.dir/timing.cpp.o -MF CMakeFiles/RTScudoStandalone.x86_64.dir/timing.cpp.o.d -o CMakeFiles/RTScudoStandalone.x86_64.dir/timing.cpp.o -c /workspace/srcdir/compiler-rt-17.0.6.src/lib/scudo/standalone/timing.cpp [...] [20:54:03] In file included from /workspace/srcdir/compiler-rt-17.0.6.src/lib/scudo/standalone/timing.cpp:9: [20:54:03] /workspace/srcdir/compiler-rt-17.0.6.src/lib/scudo/standalone/timing.h: In member function ‘void scudo::TimingManager::printImpl(scudo::ScopedString&, scudo::u32, scudo::u32)’: [20:54:03] /workspace/srcdir/compiler-rt-17.0.6.src/lib/scudo/standalone/timing.h:182:21: error: expected ‘)’ before ‘PRId64’ [20:54:03] Str.append("%14" PRId64 ".%" PRId64 "(ns) %-11s", Integral, Fraction, " "); [20:54:03] ~ ^~~~~~~ [20:54:03] ) [20:54:03] /workspace/srcdir/compiler-rt-17.0.6.src/lib/scudo/standalone/timing.h:182:16: warning: conversion lacks type at end of format [-Wformat=] [20:54:03] Str.append("%14" PRId64 ".%" PRId64 "(ns) %-11s", Integral, Fraction, " "); [20:54:03] ^~~~~ [20:54:03] /workspace/srcdir/compiler-rt-17.0.6.src/lib/scudo/standalone/timing.h:182:16: warning: too many arguments for format [-Wformat-extra-args] [20:54:03] /workspace/srcdir/compiler-rt-17.0.6.src/lib/scudo/standalone/timing.h:186:23: error: expected ‘)’ before ‘PRId64’ [20:54:03] Str.append("%s (%" PRId64 ")\n", Timers[HandleId].Name, Occurrence); [20:54:03] ~ ^~~~~~~ [20:54:03] ) [20:54:03] /workspace/srcdir/compiler-rt-17.0.6.src/lib/scudo/standalone/timing.h:186:16: warning: spurious trailing ‘%’ in format [-Wformat=] [20:54:03] Str.append("%s (%" PRId64 ")\n", Timers[HandleId].Name, Occurrence); [20:54:03] ^~~~~~~ ``` when compiling compiler-rt with GCC 8. This was resolved by defining `__STDC_FORMAT_MACROS`.
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions