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

Wrap linker flags on Windows for IntelLLLVM #2179

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
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: 5 additions & 5 deletions cmake/helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,17 @@ function(add_ur_target_link_options name)
endif()
elseif(MSVC)
target_link_options(${name} PRIVATE
/DYNAMICBASE
/HIGHENTROPYVA
/NXCOMPAT
LINKER:/DYNAMICBASE
LINKER:/HIGHENTROPYVA
LINKER:/NXCOMPAT
)
endif()
endfunction()

function(add_ur_target_exec_options name)
if(MSVC)
target_link_options(${name} PRIVATE
/ALLOWISOLATION
LINKER:/ALLOWISOLATION
)
endif()
endfunction()
Expand All @@ -159,7 +159,7 @@ function(add_ur_library name)
add_ur_target_link_options(${name})
if(MSVC)
target_link_options(${name} PRIVATE
$<$<STREQUAL:$<TARGET_LINKER_FILE_NAME:${name}>,link.exe>:/DEPENDENTLOADFLAG:0x2000>
$<$<STREQUAL:$<TARGET_LINKER_FILE_NAME:${name}>,link.exe>:LINKER:/DEPENDENTLOADFLAG:0x2000>
)
endif()
endfunction()
Expand Down
2 changes: 1 addition & 1 deletion source/adapters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function(add_ur_adapter name)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../adapter.def.in ${ADAPTER_VERSION_SCRIPT} @ONLY)
set_target_properties(${name} PROPERTIES
LINK_FLAGS "/DEF:${ADAPTER_VERSION_SCRIPT}"
LINK_OPTIONS "LINKER:/DEF:${ADAPTER_VERSION_SCRIPT}"
)
elseif(APPLE)
target_compile_options(${name} PRIVATE "-fvisibility=hidden")
Expand Down
4 changes: 2 additions & 2 deletions source/adapters/level_zero/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ if(UR_BUILD_ADAPTER_L0)

if (WIN32)
# 0x800: Search for the DLL only in the System32 folder
target_link_options(ur_adapter_level_zero PRIVATE /DEPENDENTLOADFLAG:0x800)
target_link_options(ur_adapter_level_zero PRIVATE LINKER:/DEPENDENTLOADFLAG:0x800)
endif()

target_link_libraries(ur_adapter_level_zero PRIVATE
Expand Down Expand Up @@ -194,7 +194,7 @@ if(UR_BUILD_ADAPTER_L0_V2)

if (WIN32)
# 0x800: Search for the DLL only in the System32 folder
target_link_options(ur_adapter_level_zero_v2 PUBLIC /DEPENDENTLOADFLAG:0x800)
target_link_options(ur_adapter_level_zero_v2 PUBLIC LINKER:/DEPENDENTLOADFLAG:0x800)
endif()

target_link_libraries(ur_adapter_level_zero_v2 PRIVATE
Expand Down
2 changes: 1 addition & 1 deletion source/loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (MSVC)
set(LOADER_VERSION_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/ur_loader.def)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/loader.def.in ${LOADER_VERSION_SCRIPT} @ONLY)
set_target_properties(ur_loader PROPERTIES
LINK_FLAGS "/DEF:${LOADER_VERSION_SCRIPT}"
LINK_OPTIONS "LINKER:/DEF:${LOADER_VERSION_SCRIPT}"
)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(TARGET_LIBNAME libur_loader_${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
Expand Down
Loading