From 1b726379224a76a43ff714f20ae6e5b262489109 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 29 Jun 2024 02:28:34 +0200 Subject: [PATCH] [scripts] Fix wasm builds (#39106) --- ports/vcpkg-tool-meson/vcpkg.json | 2 +- ports/vcpkg-tool-meson/vcpkg_configure_meson.cmake | 8 ++++++-- scripts/cmake/vcpkg_configure_make.cmake | 3 +++ versions/baseline.json | 2 +- versions/v-/vcpkg-tool-meson.json | 5 +++++ 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ports/vcpkg-tool-meson/vcpkg.json b/ports/vcpkg-tool-meson/vcpkg.json index 8e8a0b071f..5f52a85414 100644 --- a/ports/vcpkg-tool-meson/vcpkg.json +++ b/ports/vcpkg-tool-meson/vcpkg.json @@ -1,7 +1,7 @@ { "name": "vcpkg-tool-meson", "version": "1.3.2", - "port-version": 7, + "port-version": 8, "description": "Meson build system", "homepage": "https://github.com/mesonbuild/meson", "license": "Apache-2.0", diff --git a/ports/vcpkg-tool-meson/vcpkg_configure_meson.cmake b/ports/vcpkg-tool-meson/vcpkg_configure_meson.cmake index 6745ce3da9..2bb67aeb88 100644 --- a/ports/vcpkg-tool-meson/vcpkg_configure_meson.cmake +++ b/ports/vcpkg-tool-meson/vcpkg_configure_meson.cmake @@ -42,7 +42,9 @@ function(z_vcpkg_meson_set_proglist_variables config_type) list(FILTER ${prog}flags EXCLUDE REGEX "(-|/)nologo") # Breaks compiler detection otherwise z_vcpkg_meson_convert_list_to_python_array(${prog}flags ${${prog}flags}) set("${var_to_set}" "${meson_${prog}} = ${${prog}flags}" PARENT_SCOPE) - if (DEFINED VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID AND NOT VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID MATCHES "^(GNU|Intel)$") + if (DEFINED VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID + AND NOT VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID MATCHES "^(GNU|Intel)$" + AND VCPKG_DETECTED_CMAKE_LINKER) string(TOUPPER "MESON_${prog}_LD" var_to_set) set(${var_to_set} "${meson_${prog}}_ld = ['${VCPKG_DETECTED_CMAKE_LINKER}']" PARENT_SCOPE) endif() @@ -56,7 +58,9 @@ function(z_vcpkg_meson_set_proglist_variables config_type) z_vcpkg_meson_convert_list_to_python_array(${prog}flags ${${prog}flags}) string(TOLOWER "${prog}" proglower) set("${var_to_set}" "${proglower} = ${${prog}flags}" PARENT_SCOPE) - if (DEFINED VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID AND NOT VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID MATCHES "^(GNU|Intel)$") + if (DEFINED VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID + AND NOT VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID MATCHES "^(GNU|Intel)$" + AND VCPKG_DETECTED_CMAKE_LINKER) string(TOUPPER "MESON_${prog}_LD" var_to_set) set(${var_to_set} "${proglower}_ld = ['${VCPKG_DETECTED_CMAKE_LINKER}']" PARENT_SCOPE) endif() diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 74d14fd855..73d94f956e 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -552,6 +552,9 @@ function(vcpkg_configure_make) # OSX dosn't like CMAKE_C(XX)_COMPILER (cc) in CC/CXX and rather wants to have gcc/g++ vcpkg_list(SET z_vcm_all_tools) function(z_vcpkg_make_set_env envvar cmakevar) + if(NOT VCPKG_DETECTED_CMAKE_${cmakevar}) + return() + endif() set(prog "${VCPKG_DETECTED_CMAKE_${cmakevar}}") if(NOT DEFINED ENV{${envvar}} AND NOT prog STREQUAL "") vcpkg_list(APPEND z_vcm_all_tools "${prog}") diff --git a/versions/baseline.json b/versions/baseline.json index 00452ce3e3..156c1f51fb 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9178,7 +9178,7 @@ }, "vcpkg-tool-meson": { "baseline": "1.3.2", - "port-version": 7 + "port-version": 8 }, "vcpkg-tool-mozbuild": { "baseline": "4.0.2", diff --git a/versions/v-/vcpkg-tool-meson.json b/versions/v-/vcpkg-tool-meson.json index ab413039d2..aee7cd103f 100644 --- a/versions/v-/vcpkg-tool-meson.json +++ b/versions/v-/vcpkg-tool-meson.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "22011ab1f929bf881c5521272ee0818cb75dee1c", + "version": "1.3.2", + "port-version": 8 + }, { "git-tree": "3516ee436fc923a7ac6344886ff394e80ebc6e09", "version": "1.3.2",