[llvm] [offload] Standalone build fixes (PR #118173)
Michał Górny via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 04:35:32 PST 2024
mgorny wrote:
> Can you see if your patch still works or needs some modification after #117933 has landed? Once confirmed, I think we can accept. Thank you, much appreciated!
It will need changes to correctly get libc path. Otherwise, it ends up using `-I/../libc` and fails to build:
```
[1/948] Building LLVM bitcode Misc.cpp-gfx700.bc
FAILED: DeviceRTL/Misc.cpp-gfx700.bc /home/mgorny/git/llvm-project/offload/build/DeviceRTL/Misc.cpp-gfx700.bc
cd /home/mgorny/git/llvm-project/offload/build/DeviceRTL && /usr/lib/llvm/20/bin/clang -c -foffload-lto -std=c++17 -fvisibility=hidden -O3 -mllvm -openmp-opt-disable -DSHARED_SCRATCHPAD_SIZE=512 -mllvm -vectorize-slp=false --offload-device-only -nocudalib -nogpulib -nogpuinc -nostdlibinc -fopenmp -fopenmp-cuda-mode -Wno-unknown-cuda-version -DOMPTARGET_DEVICE_RUNTIME -I/home/mgorny/git/llvm-project/offload/DeviceRTL/include -I/home/mgorny/git/llvm-project/offload/DeviceRTL/../include -I/../libc -I/usr/lib/llvm/20/include --offload-arch=gfx700 -Xclang -mcode-object-version=none -MD -MF Misc.cpp-gfx700.bc.d /home/mgorny/git/llvm-project/offload/DeviceRTL/src/Misc.cpp -o Misc.cpp-gfx700.bc && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/mgorny/git/llvm-project/offload /home/mgorny/git/llvm-project/offload/DeviceRTL /home/mgorny/git/llvm-project/offload/build /home/mgorny/git/llvm-project/offload/build/DeviceRTL /home/mgorny/git/llvm-project/offload/build/DeviceRTL/Misc.cpp-gfx700.bc.d /home/mgorny/git/llvm-project/offload/build/CMakeFiles/d/9c7958eff40701604e86ea8dc6b37f4c825ec8823d58e7cb26ac0ea9f8a5c29b.d
/home/mgorny/git/llvm-project/offload/DeviceRTL/src/Misc.cpp:16:10: fatal error: 'shared/rpc.h' file not found
16 | #include "shared/rpc.h"
| ^~~~~~~~~~~~~~
1 error generated.
[14/948] Building LLVM bitcode Parallelism.cpp-gfx700.bc
ninja: build stopped: subcommand failed.
```
I can make a PR to that PR branch, if you'd like, though it'd probably be cleaner if it were rebased on this one first — or just submit another fix once it's merged.
https://github.com/llvm/llvm-project/pull/118173
More information about the llvm-commits
mailing list