Files
CMake/Modules/Compiler/ADSP.cmake
Brad King 7b4c87edae ADSP: Do not pass executable link flags when creating a static library
This was done by mistake in commit d090159318 (ENH: add support for the
ADSP toolchains for Blackfin, Shark and TigerShark DSPs, patch from
Raphael Cotty, 2007-07-12, v2.6.0~1446), and preserved in the
generalization by commit e9eabb0dcd (ADSP: Configure compiler in
compiler module, 2022-03-24, v3.24.0-rc1~331^2~1).  Fix both places.
2025-06-09 16:08:33 -04:00

31 lines
1004 B
CMake

include_guard()
set(CMAKE_EXECUTABLE_SUFFIX ".dxe")
macro(__compiler_adsp lang)
set(CMAKE_${lang}_OUTPUT_EXTENSION ".doj")
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-flags-link" " ")
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")
set(CMAKE_${lang}_LINK_MODE DRIVER)
set(_CMAKE_${lang}_ADSP_FLAGS "-proc=${CMAKE_ADSP_PROCESSOR}")
set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -Mo <DEP_FILE>")
set(CMAKE_${lang}_COMPILE_OBJECT
"<CMAKE_${lang}_COMPILER> ${_CMAKE_${lang}_ADSP_FLAGS} <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
"<CMAKE_${lang}_COMPILER> ${_CMAKE_${lang}_ADSP_FLAGS} -build-lib -o <TARGET> <OBJECTS>")
set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> ${_CMAKE_${lang}_ADSP_FLAGS} <FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
unset(_CMAKE_${lang}_ADSP_FLAGS)
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY)
set(CMAKE_${lang}_CREATE_MODULE_LIBRARY)
endmacro()