From 77e139b0c766c2b7fd3e6c33cebd1c87143b3243 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 9 Jan 2024 15:15:17 +0100 Subject: [PATCH] Add -fPIC --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b395a8..58dec1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -251,8 +251,11 @@ if (XEUS_NELSON_BUILD_STATIC) else () xnelson_create_target(xeus-nelson-static STATIC xeus-nelson) endif () + if (XEUS_NELSON_EMSCRIPTEN_WASM_BUILD) + target_compile_options(xeus-ruby-static PRIVATE -fPIC) + endif () list(APPEND XEUS_NELSON_TARGETS xeus-nelson-static) - + endif () # xnelson @@ -273,6 +276,7 @@ if (XEUS_NELSON_EMSCRIPTEN_WASM_BUILD) add_executable(xnelson_wasm src/main_emscripten_kernel.cpp) target_link_libraries(xnelson_wasm PRIVATE xeus-lite) target_compile_features(xnelson_wasm PRIVATE cxx_std_17) + target_compile_options(xnelson_wasm PRIVATE -fPIC) xnelson_set_kernel_options(xnelson_wasm) xeus_wasm_compile_options(xnelson_wasm) xeus_wasm_link_options(xnelson_wasm "web,worker")