Skip to content

Commit

Permalink
CMake: Remove -segprot flag on MacOS
Browse files Browse the repository at this point in the history
We no longer need to change page protection.
  • Loading branch information
stenzek committed Oct 10, 2023
1 parent c8e0390 commit 312a583
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pcsx2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1220,11 +1220,6 @@ if (APPLE)
find_library(METAL_LIBRARY Metal)
find_library(QUARTZCORE_LIBRARY QuartzCore)
target_link_libraries(PCSX2_FLAGS INTERFACE ${METAL_LIBRARY} ${QUARTZCORE_LIBRARY})

# MacOS defaults to having a maximum protection of the __DATA segment of rw (non-executable)
# We have a bunch of page-sized arrays in bss that we use for jit
# Obviously not being able to make those arrays executable would be a problem
target_link_options(PCSX2_FLAGS INTERFACE -Wl,-segprot,__DATA,rwx,rw)
endif()

set_property(GLOBAL PROPERTY PCSX2_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down

0 comments on commit 312a583

Please sign in to comment.