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

fix(compiler): Force linking of libomp with libstdc++ in debug builds #615

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion compilers/concrete-compiler/compiler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ else
PYTHON_TESTS_MARKER="not parallel"
endif

# Force linking of libomp with libstdc++ in debug builds, as these
# rely on code from libstdc++ implementing assertions
LIBOMP_LINK_TO_LIBSTDCXX_OPT=
ifeq ($(BUILD_TYPE),Debug)
LIBOMP_LINK_TO_LIBSTDCXX_OPT=-DLIBOMP_USE_STDCPPLIB=ON
endif

all: concretecompiler python-bindings build-tests build-benchmarks build-mlbench doc

# HPX #####################################################
Expand Down Expand Up @@ -151,7 +158,8 @@ $(BUILD_DIR)/configured.stamp:
-DLLVM_EXTERNAL_CONCRETELANG_SOURCE_DIR=. \
-DPython3_EXECUTABLE=${Python3_EXECUTABLE} \
-DCONCRETELANG_CUDA_SUPPORT=${CUDA_SUPPORT} \
-DCUDAToolkit_ROOT=$(CUDA_PATH)
-DCUDAToolkit_ROOT=$(CUDA_PATH) \
$(LIBOMP_LINK_TO_LIBSTDCXX_OPT)
touch $@

build-initialized: $(BUILD_DIR)/configured.stamp
Expand Down