1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

Emscripten: Detect and identify linker invoked by the compiler driver

This commit is contained in:
Brad King
2025-09-17 14:01:34 -04:00
parent 7f3f6d1ec6
commit f2b2bac85d
8 changed files with 108 additions and 0 deletions

View File

@@ -71,6 +71,9 @@ function(cmake_parse_implicit_link_info2 text log_var obj_regex)
if(is_cray)
string(APPEND linker "|cce_omp_offload_linker")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
string(APPEND linker "|wasm-ld")
endif()
if(CMAKE_LINKER)
get_filename_component(default_linker ${CMAKE_LINKER} NAME)
if (NOT default_linker MATCHES "(${linker})")

View File

@@ -1,4 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# LLD is the default linker
include(Platform/Linker/Emscripten-LLD-C)

View File

@@ -1,4 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# LLD is the default linker
include(Platform/Linker/Emscripten-LLD-CXX)