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

Convert shared build of LLVM OpenMP to in-tree #1558

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ppenzin
Copy link

@ppenzin ppenzin commented Sep 26, 2024

LLVM OpenMP can't bed built both ways at the same time, also in-tree build needs to avoid 32-bit for now as well.

LLVM OpenMP can't bed built both ways at the same time, also in-tree
build needs to avoid 32-bit for now as well.
@ppenzin
Copy link
Author

ppenzin commented Sep 26, 2024

@wangpc-pp this is the approach I've mentioned earlier. This was developed for only one OpenMP build type (shared, but would work for either, as long it's just one), and it doesn't look as good with half of the out-of-tree build still left around.

@@ -80,6 +80,8 @@ EXTRA_MULTILIB_TEST := @extra_multilib_test@
XLEN := $(shell echo $(WITH_ARCH) | tr A-Z a-z | sed 's/.*rv\([0-9]*\).*/\1/')
ifneq ($(XLEN),32)
XLEN := 64
LLVM_OPENMP := openmp
LLVM_OPENMP_CMAKE_FLAGS := -DRUNTIMES_CMAKE_ARGS="-DLIBOMP_OMPD_SUPPORT=OFF;-DLIBOMP_ARCHER_SUPPORT=OFF;-DOPENMP_ENABLE_LIBOMPTARGET=OFF"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we turn off these for static build as well?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We disable LIBOMPTARGGET already. Archer and OMPD are related to debugging, if out of tree build locates them it might be one more argument in favor of that 😄

Copy link
Author

@ppenzin ppenzin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See response inline. It might make sense to still test in-tree build, though not sure that in scope for this project.

@@ -80,6 +80,8 @@ EXTRA_MULTILIB_TEST := @extra_multilib_test@
XLEN := $(shell echo $(WITH_ARCH) | tr A-Z a-z | sed 's/.*rv\([0-9]*\).*/\1/')
ifneq ($(XLEN),32)
XLEN := 64
LLVM_OPENMP := openmp
LLVM_OPENMP_CMAKE_FLAGS := -DRUNTIMES_CMAKE_ARGS="-DLIBOMP_OMPD_SUPPORT=OFF;-DLIBOMP_ARCHER_SUPPORT=OFF;-DOPENMP_ENABLE_LIBOMPTARGET=OFF"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We disable LIBOMPTARGGET already. Archer and OMPD are related to debugging, if out of tree build locates them it might be one more argument in favor of that 😄

@@ -1148,36 +1150,18 @@ stamps/build-llvm-linux: $(LLVM_SRCDIR) $(LLVM_SRC_GIT) $(BINUTILS_SRCDIR) $(BIN
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_TARGETS_TO_BUILD="RISCV" \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind;$(LLVM_OPENMP)" \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If LLVM_OPENMP is empty, the build system of LLVM will complain Runtime "" is not a supported runtime..

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

Successfully merging this pull request may close these issues.

2 participants