diff options
author | Brad King <brad.king@kitware.com> | 2023-09-28 22:51:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-10-02 22:51:46 (GMT) |
commit | 12733d0d8d9145f8cff620098bfc911cd4ea6234 (patch) | |
tree | 6e4b5ed6dca698a231c6c215684683e148c74b33 | |
parent | 92adbb5d8c2a043c6e6c8539e9817a75a813fa1b (diff) | |
download | CMake-12733d0d8d9145f8cff620098bfc911cd4ea6234.zip CMake-12733d0d8d9145f8cff620098bfc911cd4ea6234.tar.gz CMake-12733d0d8d9145f8cff620098bfc911cd4ea6234.tar.bz2 |
CMakeParseImplicitLinkInfo: Detect link lines using link.exe and lld-link
These are printed by LLVM-based compiler drivers targeting the MSVC ABI.
In our use case for this, `CMAKE_LINKER` may not yet be known, so do
not include it in the test data.
14 files changed, 144 insertions, 6 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 1773dc4..9213cc9 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -26,12 +26,22 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj set(multiValueArgs ) cmake_parse_arguments(EXTRA_PARSE "${keywordArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + set(is_msvc 0) + if(EXTRA_PARSE_LANGUAGE AND + ("x${CMAKE_${EXTRA_PARSE_LANGUAGE}_ID}" STREQUAL "xMSVC" OR + "x${CMAKE_${EXTRA_PARSE_LANGUAGE}_SIMULATE_ID}" STREQUAL "xMSVC")) + set(is_msvc 1) + endif() + # Parse implicit linker arguments. set(linker "CMAKE_LINKER-NOTFOUND") if(CMAKE_LINKER) get_filename_component(linker ${CMAKE_LINKER} NAME) string(REGEX REPLACE "([][+.*?()^$])" "\\\\\\1" linker "${linker}") endif() + if(is_msvc) + string(APPEND linker "|link\\.exe|lld-link") + endif() set(startfile "CMAKE_LINK_STARTFILE-NOTFOUND") if(CMAKE_LINK_STARTFILE) set(startfile "${CMAKE_LINK_STARTFILE}") @@ -75,12 +85,6 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj endif() endif() endif() - set(is_msvc 0) - if(EXTRA_PARSE_LANGUAGE AND - ("x${CMAKE_${EXTRA_PARSE_LANGUAGE}_ID}" STREQUAL "xMSVC" OR - "x${CMAKE_${EXTRA_PARSE_LANGUAGE}_SIMULATE_ID}" STREQUAL "xMSVC")) - set(is_msvc 1) - endif() set(search_static 0) if("${cmd}" MATCHES "${linker_regex}") string(APPEND log " link line: [${line}]\n") diff --git a/Tests/RunCMake/ParseImplicitData/windows_arm64-C-Clang-17.0.1-MSVC.input b/Tests/RunCMake/ParseImplicitData/windows_arm64-C-Clang-17.0.1-MSVC.input new file mode 100644 index 0000000..d28b970 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/windows_arm64-C-Clang-17.0.1-MSVC.input @@ -0,0 +1,20 @@ +CMAKE_LANG=C +CMAKE_LINKER= +CMAKE_C_COMPILER_ABI= +CMAKE_C_COMPILER_AR= +CMAKE_C_COMPILER_ARCHITECTURE_ID=ARM64 +CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_C_COMPILER_ID=Clang +CMAKE_C_COMPILER_LAUNCHER= +CMAKE_C_COMPILER_LOADED=1 +CMAKE_C_COMPILER_RANLIB= +CMAKE_C_COMPILER_TARGET= +CMAKE_C_COMPILER_VERSION=17.0.1 +CMAKE_C_COMPILER_VERSION_INTERAL= +CMAKE_C_SIMULATE_ID=MSVC +clang version 17.0.1 +Target: aarch64-pc-windows-msvc +Thread model: posix +InstalledDir: C:\DoesNotExist\LLVM\bin + "C:\\DoesNotExist\\LLVM\\bin\\clang-cl.exe" -cc1 -triple aarch64-pc-windows-msvc19.36.32532 -emit-obj -mrelax-all -mincremental-linker-compatible -dumpdir a- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -mframe-pointer=none -relaxed-aliasing -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -target-feature +neon -target-feature +v8a -target-abi aapcs -D_MT -flto-visibility-public-std --dependent-lib=libcmt --dependent-lib=oldnames -stack-protector 2 -fdiagnostics-format msvc -v "-fcoverage-compilation-dir=C:\\DoesNotExist\\Temp" -resource-dir "C:\\DoesNotExist\\LLVM\\lib\\clang\\17" -internal-isystem "C:\\DoesNotExist\\LLVM\\lib\\clang\\17\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\ATLMFC\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\VS\\include" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22621.0\\ucrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\um" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\shared" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\winrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\cppwinrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\include\\um" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\ATLMFC\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\VS\\include" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22621.0\\ucrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\um" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\shared" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\winrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\cppwinrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\include\\um" "-fdebug-compilation-dir=C:\\DoesNotExist\\Temp" -ferror-limit 19 -fno-use-cxa-atexit -fms-extensions -fms-compatibility -fms-compatibility-version=19.36.32532 -fdelayed-template-parsing -target-feature -fmv -faddrsig -o "C:\\DoesNotExist\\Temp\\CMakeCCompilerABI-742dcb.obj" -x c CMakeCCompilerABI.c + "C:\\DoesNotExist\\LLVM\\bin\\lld-link" -out:CMakeCCompilerABI.exe "-libpath:C:\\DoesNotExist\\LLVM\\lib\\clang\\17\\lib\\windows" -nologo "C:\\DoesNotExist\\Temp\\CMakeCCompilerABI-742dcb.obj" diff --git a/Tests/RunCMake/ParseImplicitData/windows_arm64-CXX-Clang-17.0.1-MSVC.input b/Tests/RunCMake/ParseImplicitData/windows_arm64-CXX-Clang-17.0.1-MSVC.input new file mode 100644 index 0000000..e82a4fa --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/windows_arm64-CXX-Clang-17.0.1-MSVC.input @@ -0,0 +1,20 @@ +CMAKE_LANG=CXX +CMAKE_LINKER= +CMAKE_CXX_COMPILER_ABI= +CMAKE_CXX_COMPILER_AR= +CMAKE_CXX_COMPILER_ARCHITECTURE_ID=ARM64 +CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_CXX_COMPILER_ID=Clang +CMAKE_CXX_COMPILER_LAUNCHER= +CMAKE_CXX_COMPILER_LOADED=1 +CMAKE_CXX_COMPILER_RANLIB= +CMAKE_CXX_COMPILER_TARGET= +CMAKE_CXX_COMPILER_VERSION=17.0.1 +CMAKE_CXX_COMPILER_VERSION_INTERAL= +CMAKE_CXX_SIMULATE_ID=MSVC +clang version 17.0.1 +Target: aarch64-pc-windows-msvc +Thread model: posix +InstalledDir: C:\DoesNotExist\LLVM\bin + "C:\\DoesNotExist\\LLVM\\bin\\clang-cl.exe" -cc1 -triple aarch64-pc-windows-msvc19.36.32532 -emit-obj -mrelax-all -mincremental-linker-compatible -dumpdir a- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=none -relaxed-aliasing -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -target-feature +neon -target-feature +v8a -target-abi aapcs -D_MT -flto-visibility-public-std --dependent-lib=libcmt --dependent-lib=oldnames -stack-protector 2 -fdiagnostics-format msvc -v "-fcoverage-compilation-dir=C:\\DoesNotExist\\Temp" -resource-dir "C:\\DoesNotExist\\LLVM\\lib\\clang\\17" -internal-isystem "C:\\DoesNotExist\\LLVM\\lib\\clang\\17\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\ATLMFC\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\VS\\include" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22621.0\\ucrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\um" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\shared" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\winrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\cppwinrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\include\\um" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\ATLMFC\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\VS\\include" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22621.0\\ucrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\um" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\shared" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\winrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.22621.0\\\\cppwinrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\include\\um" -fdeprecated-macro "-fdebug-compilation-dir=C:\\DoesNotExist\\Temp" -ferror-limit 19 -fno-use-cxa-atexit -fms-extensions -fms-compatibility -fms-compatibility-version=19.36.32532 -std=c++14 -fdelayed-template-parsing -target-feature -fmv -faddrsig -o "C:\\DoesNotExist\\Temp\\CMakeCXXCompilerABI-266f4c.obj" -x c++ CMakeCXXCompilerABI.cpp + "C:\\DoesNotExist\\LLVM\\bin\\lld-link" -out:CMakeCXXCompilerABI.exe "-libpath:C:\\DoesNotExist\\LLVM\\lib\\clang\\17\\lib\\windows" -nologo "C:\\DoesNotExist\\Temp\\CMakeCXXCompilerABI-266f4c.obj" diff --git a/Tests/RunCMake/ParseImplicitData/windows_arm64-Fortran-LLVMFlang-17.0.1-MSVC.input b/Tests/RunCMake/ParseImplicitData/windows_arm64-Fortran-LLVMFlang-17.0.1-MSVC.input new file mode 100644 index 0000000..4937a41 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/windows_arm64-Fortran-LLVMFlang-17.0.1-MSVC.input @@ -0,0 +1,20 @@ +CMAKE_LANG=Fortran +CMAKE_LINKER= +CMAKE_Fortran_COMPILER_ABI= +CMAKE_Fortran_COMPILER_AR= +CMAKE_Fortran_COMPILER_ARCHITECTURE_ID=ARM64 +CMAKE_Fortran_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_Fortran_COMPILER_ID=LLVMFlang +CMAKE_Fortran_COMPILER_LAUNCHER= +CMAKE_Fortran_COMPILER_LOADED=1 +CMAKE_Fortran_COMPILER_RANLIB= +CMAKE_Fortran_COMPILER_TARGET= +CMAKE_Fortran_COMPILER_VERSION=17.0.1 +CMAKE_Fortran_COMPILER_VERSION_INTERAL= +CMAKE_Fortran_SIMULATE_ID=MSVC +flang-new version 17.0.1 +Target: aarch64-pc-windows-msvc +Thread model: posix +InstalledDir: C:\DoesNotExist\LLVM\bin + "C:\\DoesNotExist\\LLVM\\bin\\flang-new" -fc1 -triple aarch64-pc-windows-msvc19.36.32532 -emit-obj -mrelocation-model pic -pic-level 2 -target-cpu generic -target-feature +neon -target-feature +v8a -o "C:\\DoesNotExist\\Temp\\CMakeFortranCompilerABI-ac5f0c.o" -x f95-cpp-input CMakeFortranCompilerABI.F + "C:\\DoesNotExist\\LLVM\\bin\\lld-link" -out:a.exe "-libpath:C:\\DoesNotExist\\LLVM\\lib" Fortran_main.lib FortranRuntime.lib FortranDecimal.lib /subsystem:console "-libpath:C:\\DoesNotExist\\LLVM\\lib\\clang\\17\\lib\\windows" -nologo "C:\\DoesNotExist\\Temp\\CMakeFortranCompilerABI-ac5f0c.o" diff --git a/Tests/RunCMake/ParseImplicitData/windows_x86_64-C-Clang-17.0.1-MSVC.input b/Tests/RunCMake/ParseImplicitData/windows_x86_64-C-Clang-17.0.1-MSVC.input new file mode 100644 index 0000000..b823880 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/windows_x86_64-C-Clang-17.0.1-MSVC.input @@ -0,0 +1,20 @@ +CMAKE_LANG=C +CMAKE_LINKER= +CMAKE_C_COMPILER_ABI= +CMAKE_C_COMPILER_AR= +CMAKE_C_COMPILER_ARCHITECTURE_ID=x64 +CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_C_COMPILER_ID=Clang +CMAKE_C_COMPILER_LAUNCHER= +CMAKE_C_COMPILER_LOADED=1 +CMAKE_C_COMPILER_RANLIB= +CMAKE_C_COMPILER_TARGET= +CMAKE_C_COMPILER_VERSION=17.0.1 +CMAKE_C_COMPILER_VERSION_INTERAL= +CMAKE_C_SIMULATE_ID=MSVC +clang version 17.0.1 +Target: x86_64-pc-windows-msvc +Thread model: posix +InstalledDir: C:\DoesNotExist\LLVM\bin + "C:\\DoesNotExist\\LLVM\\bin\\clang-cl.exe" "-cc1" "-triple" "x86_64-pc-windows-msvc19.29.30152" "-emit-obj" "-mrelax-all" "-mincremental-linker-compatible" "-dumpdir" "a-" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "CMakeCCompilerABI.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=none" "-relaxed-aliasing" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-mllvm" "-x86-asm-syntax=intel" "-tune-cpu" "generic" "-D_MT" "-flto-visibility-public-std" "--dependent-lib=libcmt" "--dependent-lib=oldnames" "-stack-protector" "2" "-fms-volatile" "-fdiagnostics-format" "msvc" "-fcoverage-compilation-dir=C:\\DoesNotExist\\Temp" "-resource-dir" "C:\\DoesNotExist\\LLVM\\lib\\clang\\17" "-internal-isystem" "C:\\DoesNotExist\\LLVM\\lib\\clang\\17\\include" "-internal-isystem" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include" "-internal-isystem" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\shared" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\um" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\cppwinrt" "-fdebug-compilation-dir=C:\\DoesNotExist\\Temp" "-ferror-limit" "19" "-fno-use-cxa-atexit" "-fms-extensions" "-fms-compatibility" "-fms-compatibility-version=19.29.30152" "-fdelayed-template-parsing" "-faddrsig" "-o" "C:\\DoesNotExist\\Temp\\CMakeCCompilerABI-ebc8cc.obj" "-x" "c" "CMakeCCompilerABI.c" + "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64\\link.exe" "-out:CMakeCCompilerABI.exe" "-libpath:C:\\DoesNotExist\\LLVM\\lib\\clang\\17\\lib\\windows" "-nologo" "C:\\DoesNotExist\\Temp\\CMakeCCompilerABI-ebc8cc.obj" diff --git a/Tests/RunCMake/ParseImplicitData/windows_x86_64-CXX-Clang-17.0.1-MSVC.input b/Tests/RunCMake/ParseImplicitData/windows_x86_64-CXX-Clang-17.0.1-MSVC.input new file mode 100644 index 0000000..756fd13 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/windows_x86_64-CXX-Clang-17.0.1-MSVC.input @@ -0,0 +1,20 @@ +CMAKE_LANG=CXX +CMAKE_LINKER= +CMAKE_CXX_COMPILER_ABI= +CMAKE_CXX_COMPILER_AR= +CMAKE_CXX_COMPILER_ARCHITECTURE_ID=x64 +CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_CXX_COMPILER_ID=Clang +CMAKE_CXX_COMPILER_LAUNCHER= +CMAKE_CXX_COMPILER_LOADED=1 +CMAKE_CXX_COMPILER_RANLIB= +CMAKE_CXX_COMPILER_TARGET= +CMAKE_CXX_COMPILER_VERSION=17.0.1 +CMAKE_CXX_COMPILER_VERSION_INTERAL= +CMAKE_CXX_SIMULATE_ID=MSVC +clang version 17.0.1 +Target: x86_64-pc-windows-msvc +Thread model: posix +InstalledDir: C:\DoesNotExist\LLVM\bin + "C:\\DoesNotExist\\LLVM\\bin\\clang-cl.exe" "-cc1" "-triple" "x86_64-pc-windows-msvc19.29.30152" "-emit-obj" "-mrelax-all" "-mincremental-linker-compatible" "-dumpdir" "a-" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "CMakeCXXCompilerABI.cpp" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=none" "-relaxed-aliasing" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-mllvm" "-x86-asm-syntax=intel" "-tune-cpu" "generic" "-D_MT" "-flto-visibility-public-std" "--dependent-lib=libcmt" "--dependent-lib=oldnames" "-stack-protector" "2" "-fms-volatile" "-fdiagnostics-format" "msvc" "-fcoverage-compilation-dir=C:\\DoesNotExist\\Temp" "-resource-dir" "C:\\DoesNotExist\\LLVM\\lib\\clang\\17" "-internal-isystem" "C:\\DoesNotExist\\LLVM\\lib\\clang\\17\\include" "-internal-isystem" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include" "-internal-isystem" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\shared" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\um" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\cppwinrt" "-fdeprecated-macro" "-fdebug-compilation-dir=C:\\DoesNotExist\\Temp" "-ferror-limit" "19" "-fno-use-cxa-atexit" "-fms-extensions" "-fms-compatibility" "-fms-compatibility-version=19.29.30152" "-std=c++14" "-fdelayed-template-parsing" "-faddrsig" "-o" "C:\\DoesNotExist\\Temp\\CMakeCXXCompilerABI-9170e6.obj" "-x" "c++" "CMakeCXXCompilerABI.cpp" + "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64\\link.exe" "-out:CMakeCXXCompilerABI.exe" "-libpath:C:\\DoesNotExist\\LLVM\\lib\\clang\\17\\lib\\windows" "-nologo" "C:\\DoesNotExist\\Temp\\CMakeCXXCompilerABI-9170e6.obj" diff --git a/Tests/RunCMake/ParseImplicitData/windows_x86_64-Fortran-LLVMFlang-17.0.1-MSVC.input b/Tests/RunCMake/ParseImplicitData/windows_x86_64-Fortran-LLVMFlang-17.0.1-MSVC.input new file mode 100644 index 0000000..fb75b51 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/windows_x86_64-Fortran-LLVMFlang-17.0.1-MSVC.input @@ -0,0 +1,20 @@ +CMAKE_LANG=Fortran +CMAKE_LINKER= +CMAKE_Fortran_COMPILER_ABI= +CMAKE_Fortran_COMPILER_AR= +CMAKE_Fortran_COMPILER_ARCHITECTURE_ID=x64 +CMAKE_Fortran_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_Fortran_COMPILER_ID=LLVMFlang +CMAKE_Fortran_COMPILER_LAUNCHER= +CMAKE_Fortran_COMPILER_LOADED=1 +CMAKE_Fortran_COMPILER_RANLIB= +CMAKE_Fortran_COMPILER_TARGET= +CMAKE_Fortran_COMPILER_VERSION=17.0.1 +CMAKE_Fortran_COMPILER_VERSION_INTERAL= +CMAKE_Fortran_SIMULATE_ID=MSVC +flang-new version 17.0.1 +Target: x86_64-pc-windows-msvc +Thread model: posix +InstalledDir: C:\DoesNotExist\LLVM\bin + "C:\\DoesNotExist\\LLVM\\bin\\flang-new" "-fc1" "-triple" "x86_64-pc-windows-msvc19.29.30152" "-emit-obj" "-mrelocation-model" "pic" "-pic-level" "2" "-target-cpu" "x86-64" "-o" "C:\\DoesNotExist\\Temp\\CMakeFortranCompilerABI-54be37.o" "-x" "f95-cpp-input" "CMakeFortranCompilerABI.F" + "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64\\link.exe" "-out:a.exe" "-libpath:C:\\DoesNotExist\\LLVM\\lib" "Fortran_main.lib" "FortranRuntime.lib" "FortranDecimal.lib" "/subsystem:console" "-libpath:C:\\DoesNotExist\\LLVM\\lib\\clang\\17\\lib\\windows" "-nologo" "C:\\DoesNotExist\\Temp\\CMakeFortranCompilerABI-54be37.o" diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake index fa7bf07..04998a2 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake +++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake @@ -42,6 +42,8 @@ set(targets netbsd_nostdinc-C-GNU-4.8.5 netbsd_nostdinc-CXX-GNU-4.8.5 openbsd-C-Clang-5.0.1 openbsd-CXX-Clang-5.0.1 sunos-C-SunPro-5.13.0 sunos-CXX-SunPro-5.13.0 sunos-Fortran-SunPro-8.8.0 + windows_x86_64-C-Clang-17.0.1-MSVC windows_x86_64-CXX-Clang-17.0.1-MSVC windows_x86_64-Fortran-LLVMFlang-17.0.1-MSVC + windows_arm64-C-Clang-17.0.1-MSVC windows_arm64-CXX-Clang-17.0.1-MSVC windows_arm64-Fortran-LLVMFlang-17.0.1-MSVC ) if(CMAKE_HOST_WIN32) diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_arm64-C-Clang-17.0.1-MSVC.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_arm64-C-Clang-17.0.1-MSVC.output new file mode 100644 index 0000000..df9ef98 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_arm64-C-Clang-17.0.1-MSVC.output @@ -0,0 +1,2 @@ +libs= +dirs=C:/DoesNotExist/LLVM/lib/clang/17/lib/windows diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_arm64-CXX-Clang-17.0.1-MSVC.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_arm64-CXX-Clang-17.0.1-MSVC.output new file mode 100644 index 0000000..df9ef98 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_arm64-CXX-Clang-17.0.1-MSVC.output @@ -0,0 +1,2 @@ +libs= +dirs=C:/DoesNotExist/LLVM/lib/clang/17/lib/windows diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_arm64-Fortran-LLVMFlang-17.0.1-MSVC.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_arm64-Fortran-LLVMFlang-17.0.1-MSVC.output new file mode 100644 index 0000000..65f3494 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_arm64-Fortran-LLVMFlang-17.0.1-MSVC.output @@ -0,0 +1,2 @@ +libs=Fortran_main\.lib;FortranRuntime\.lib;FortranDecimal\.lib +dirs=C:/DoesNotExist/LLVM/lib;C:/DoesNotExist/LLVM/lib/clang/17/lib/windows diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-C-Clang-17.0.1-MSVC.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-C-Clang-17.0.1-MSVC.output new file mode 100644 index 0000000..df9ef98 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-C-Clang-17.0.1-MSVC.output @@ -0,0 +1,2 @@ +libs= +dirs=C:/DoesNotExist/LLVM/lib/clang/17/lib/windows diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-CXX-Clang-17.0.1-MSVC.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-CXX-Clang-17.0.1-MSVC.output new file mode 100644 index 0000000..df9ef98 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-CXX-Clang-17.0.1-MSVC.output @@ -0,0 +1,2 @@ +libs= +dirs=C:/DoesNotExist/LLVM/lib/clang/17/lib/windows diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-Fortran-LLVMFlang-17.0.1-MSVC.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-Fortran-LLVMFlang-17.0.1-MSVC.output new file mode 100644 index 0000000..65f3494 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-Fortran-LLVMFlang-17.0.1-MSVC.output @@ -0,0 +1,2 @@ +libs=Fortran_main\.lib;FortranRuntime\.lib;FortranDecimal\.lib +dirs=C:/DoesNotExist/LLVM/lib;C:/DoesNotExist/LLVM/lib/clang/17/lib/windows |