Skip to content

Commit

Permalink
CMake: use debug build when cross-compiling
Browse files Browse the repository at this point in the history
This is a quick & dirty fix assuming that when cross-compiling,
we do that with intention to debug.

It'd be much better to detect user wants a debug build from `./configure`
arguments but this is left for later.
  • Loading branch information
janvrany committed Jan 13, 2022
1 parent bf01ec9 commit 1a2d209
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion closed/OpenJ9.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ ifeq (true,$(OPENJ9_ENABLE_CMAKE))
CMAKE_ARGS += \
-DCMAKE_TOOLCHAIN_FILE=$(OPENJ9OMR_TOPDIR)/cmake/toolchains/$(OPENJDK_TARGET_CPU)-$(OPENJDK_TARGET_OS)-cross.cmake \
-DCMAKE_FIND_ROOT_PATH=$(SYSROOT) \
-DOMR_EXE_LAUNCHER="qemu-$(OPENJDK_TARGET_CPU)-static;-L;$(SYSROOT)"
-DOMR_EXE_LAUNCHER="qemu-$(OPENJDK_TARGET_CPU)-static;-L;$(SYSROOT)" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
else
ifneq (,$(OPENJ9_CC))
CMAKE_ARGS += -DCMAKE_C_COMPILER="$(OPENJ9_CC)"
Expand Down

0 comments on commit 1a2d209

Please sign in to comment.