Skip to content

Commit

Permalink
move CMAKE_POSITION_INDEPENDENT_CODE to Makefile
Browse files Browse the repository at this point in the history
This is where I originally meant the directive to go, but it didn't seem to work
the first time I tried it, hence the added lines in wasi-sdk.cmake and
wasi-sdk-pthread.cmake.  However, it seems to work fine now, so I'm switching it
back to be consistent with other similar CMake flags.

Signed-off-by: Joel Dice <[email protected]>
  • Loading branch information
dicej committed Dec 8, 2023
1 parent f3a801f commit 761202e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ LIBCXX_CMAKE_FLAGS = \
-DCMAKE_MODULE_PATH=$(ROOT_DIR)/cmake \
-DCMAKE_TOOLCHAIN_FILE=$(ROOT_DIR)/wasi-sdk.cmake \
-DCMAKE_STAGING_PREFIX=$(PREFIX)/share/wasi-sysroot \
-DCMAKE_POSITION_INDEPENDENT_CODE=$(2) \
-DLLVM_CONFIG_PATH=$(ROOT_DIR)/build/llvm/bin/llvm-config \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCXX_SUPPORTS_CXX11=ON \
Expand Down
2 changes: 0 additions & 2 deletions wasi-sdk-pthread.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

set(CMAKE_POSITION_INDEPENDENT_CODE On)
2 changes: 0 additions & 2 deletions wasi-sdk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,3 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

set(CMAKE_POSITION_INDEPENDENT_CODE On)

0 comments on commit 761202e

Please sign in to comment.