Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add openmp and libc++ to clang #9478

Open
VinInn opened this issue Oct 22, 2024 · 2 comments
Open

add openmp and libc++ to clang #9478

VinInn opened this issue Oct 22, 2024 · 2 comments

Comments

@VinInn
Copy link

VinInn commented Oct 22, 2024

In my clang installation I used this

cmake -S llvm -B build -G Ninja -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;openmp" -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" -DCMAKE_INSTALL_PREFIX=/afs/cern.ch/user/i/innocent/w5/
ninja -j 8 -k 1024 -C build
ninja install -C build

and managed to use openmp and libc++

clang++ test.cc -o sample -fopenmp -stdlib=libstd++ -v
clang++ test.cc -o sample -fopenmp -stdlib=libc++ -v

even compiling for gpu target...

clang++ --offload-arch=native -xhip testGPU.cc -o sample -fopenmp -v -stdlib=libc++ -std=c++20 > & /dev/null ; ./sample
clang++ --offload-arch=native -xhip testGPU.cc -o sample -fopenmp -v -stdlib=libstdc++ -std=c++20 > & /dev/null ; ./sample

the latter uses the "system" gcc (well the one I used to build clang) not a random local one as hip does...

it could be useful to have it in cmsdist if anybody else is interested

@cmsbuild
Copy link
Contributor

cms-bot internal usage

@cmsbuild
Copy link
Contributor

A new Issue was created by @VinInn.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants