• Home
  • Raw
  • Download

Lines Matching +full:linux +full:- +full:no +full:- +full:asm

2 # Copyright (c) 2014-2023 The Khronos Group Inc.
3 # Copyright (c) 2014-2023 Valve Corporation
4 # Copyright (c) 2014-2023 LunarG, Inc.
6 # Copyright (c) 2023-2023 RasterGrid Kft.
12 # http://www.apache.org/licenses/LICENSE-2.0
29 …# Note: When linking your app or driver to OneCore.lib, be sure to remove any links to non-umbrell…
35 # Build dev_ext_trampoline.c and unknown_ext_chain.c with /O2 to allow tail-call optimization.
36 # Setup two CMake targets (loader-norm and loader-opt) for the different compilation flags.
42 …string(REGEX REPLACE "/RTC." "" MODIFIED_C_FLAGS_DEBUG ${MODIFIED_C_FLAGS_DEBUG}) #remove run-tim…
62 # Place it in the build directory - the GN build will use the checked in file
106 elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|DragonFly|GNU")
123 set(ASM_FAILURE_MSG "${ASM_FAILURE_MSG}Note that this may be unsafe, as the C code requires tail-ca…
135 … execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE COMPILER_VERSION_OUTPUT)
138 set(JWASM_FLAGS -win64)
141 set(JWASM_FLAGS -3 -coff)
152 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm [=[
161 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm [=[
175 …ILER} ${CMAKE_ASM_MASM_FLAGS} -c -Fo ${CMAKE_CURRENT_BINARY_DIR}/masm_check.obj ${CMAKE_CURRENT_BI…
187 … emulator is provided (Like Wine), or running on native, run asm_offset to generate gen_defines.asm
189 add_custom_command(OUTPUT gen_defines.asm DEPENDS asm_offset COMMAND asm_offset MASM)
191 …# Forces compiler to write the intermediate asm file, needed so that we can get sizeof/offset of i…
192 … target_compile_options(asm_offset PRIVATE "/Fa$<TARGET_FILE_DIR:asm_offset>/asm_offset.asm" /FA)
193 …# Force off optimization so that the output assembly includes all the necessary info - optimizer w…
197 …alues.py on asm_offset's assembly file to generate the gen_defines.asm, which the asm code depends…
199 …ter ${PROJECT_SOURCE_DIR}/scripts/parse_asm_values.py "${CMAKE_CURRENT_BINARY_DIR}/gen_defines.asm"
200 …"$<TARGET_FILE_DIR:asm_offset>/asm_offset.asm" "MASM" "${CMAKE_C_COMPILER_ID}" "${CMAKE_SYSTEM_PRO…
201 BYPRODUCTS gen_defines.asm
204 add_custom_target(loader_asm_gen_files DEPENDS gen_defines.asm)
207 add_library(loader-unknown-chain OBJECT unknown_ext_chain_masm.asm)
208 target_link_libraries(loader-unknown-chain Vulkan::Headers)
209 target_include_directories(loader-unknown-chain PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
210 add_dependencies(loader-unknown-chain loader_asm_gen_files)
215 elseif(UNIX) # i.e.: Linux & Apple
223 enable_language(ASM)
249 # Note - there is no 32 bit arm assembly code, so this only applies to x86 currently.
259 # If not cross compiling, run asm_offset to generage gen_defines.asm
261 add_custom_command(OUTPUT gen_defines.asm DEPENDS asm_offset COMMAND asm_offset GAS)
263 …# Forces compiler to write the intermediate asm file, needed so that we can get sizeof/offset of i…
264 target_compile_options(asm_offset PRIVATE -save-temps=obj)
266 set(ASM_OFFSET_EXECUTABLE_LOCATION "$<TARGET_FILE_DIR:asm_offset>/gen_defines.asm")
269 set(ASM_OFFSET_EXECUTABLE_LOCATION "$<TARGET_FILE_DIR:asm_offset>/gen_defines.asm")
273 set(ASM_OFFSET_EXECUTABLE_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/gen_defines.asm")
280 …alues.py on asm_offset's assembly file to generate the gen_defines.asm, which the asm code depends…
284 BYPRODUCTS gen_defines.asm
287 add_custom_target(loader_asm_gen_files DEPENDS gen_defines.asm)
305 add_library(loader-unknown-chain OBJECT unknown_ext_chain.c)
306 target_link_libraries(loader-unknown-chain loader_specific_options)
307 …set_target_properties(loader-unknown-chain PROPERTIES CMAKE_C_FLAGS_DEBUG "${MODIFIED_C_FLAGS_DEBU…
310 set_source_files_properties(${OPT_LOADER_SRCS} PROPERTIES COMPILE_FLAGS -O)
315 add_library(loader-opt STATIC ${OPT_LOADER_SRCS})
316 target_link_libraries(loader-opt PUBLIC loader_specific_options)
317 add_dependencies(loader-opt loader_asm_gen_files)
318 set_target_properties(loader-opt PROPERTIES CMAKE_C_FLAGS_DEBUG "${MODIFIED_C_FLAGS_DEBUG}")
326 …OADER_UNKNOWN_CHAIN_LIBRARY $<$<TARGET_EXISTS:loader-unknown-chain>:$<TARGET_OBJECTS:loader-unknow…
332 ${CMAKE_CURRENT_SOURCE_DIR}/${API_TYPE}-1.def
335 target_link_libraries(vulkan PRIVATE loader_specific_options loader-opt)
338 # mingw: libvulkan-1.dll.a / vulkan-1.dll
339 # msvc: vulkan-1.lib / vulkan-1.dll
342 OUTPUT_NAME ${API_TYPE}-1)
392 target_compile_options(vulkan PUBLIC -fsanitize=address)
393 target_link_options(vulkan PUBLIC -fsanitize=address)
396 target_compile_options(vulkan PUBLIC -fsanitize=thread)
397 target_link_options(vulkan PUBLIC -fsanitize=thread)
400 target_compile_options(vulkan PUBLIC -fsanitize=undefined)
401 target_link_options(vulkan PUBLIC -fsanitize=undefined)
406 target_link_libraries(vulkan PRIVATE "-framework CoreFoundation")
414 add_library(vulkan-framework SHARED)
415 …target_sources(vulkan-framework PRIVATE ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS} ${FRAMEWORK_HEADE…
417 add_dependencies(vulkan-framework loader_asm_gen_files)
418 …target_link_libraries(vulkan-framework ${CMAKE_DL_LIBS} Threads::Threads -lm "-framework CoreFound…
419 target_link_libraries(vulkan-framework loader_specific_options)
425 target_compile_definitions(vulkan-framework PRIVATE MODIFY_UNKNOWN_FUNCTION_DECLS)
428 …# The FRAMEWORK_VERSION needs to be "A" here so that Xcode code-signing works when a user adds the…
433 set_target_properties(vulkan-framework PROPERTIES
443 # Workaround linker warning: https://github.com/KhronosGroup/Vulkan-Loader/issues/1332
445 … # MACHO_CURRENT_VERSION specifically applies to the -current_version linker option which is the
449 …set_target_properties(vulkan-framework PROPERTIES MACHO_CURRENT_VERSION "${APPLE_VULKAN_LOADER_VER…
451 install(TARGETS vulkan-framework
470 …# TLDR: This feature only exists at the request of Google for Chromium. No other project should us…
489 # https://gitlab.kitware.com/cmake/cmake/-/issues/22621
494 set(VULKAN_LIB_SUFFIX "-1.dll")
496 set(VULKAN_LIB_SUFFIX "-1")
500 # BUG: The following code will NOT work well with `cmake --install ... --prefix <dir>`
503 # NOTE: vulkan.pc essentially cover both Vulkan-Loader and Vulkan-Headers for legacy reasons.