LinkerId: Fix detection of linker tool for Clang on OpenBSD

Do not match quotes as part of the path.
This commit is contained in:
Brad King
2023-12-13 10:36:25 -05:00
parent 455aed3061
commit 6e527c2d38
3 changed files with 3 additions and 3 deletions

View File

@@ -74,7 +74,7 @@ function(cmake_parse_implicit_link_info2 text log_var obj_regex)
# whole line and just the command (argv[0]).
set(linker_regex "^( *|.*[/\\])(${linker}|${startfile}|([^/\\]+-)?ld|collect2)[^/\\]*( |$)")
set(linker_exclude_regex "collect2 version |^[A-Za-z0-9_]+=|/ldfe ")
set(linker_tool_regex "^[ \t]*(->|\")?[ \t]*(.*[/\\](${linker}))(\"|,| |$)")
set(linker_tool_regex "^[ \t]*(->|\")?[ \t]*([^\"]*[/\\](${linker}))(\"|,| |$)")
set(linker_tool_exclude_regex "cuda-fake-ld|-fuse-ld=")
set(linker_tool "NOTFOUND")
set(linker_tool_fallback "")

View File

@@ -1,3 +1,3 @@
libs=compiler_rt;c;compiler_rt
dirs=/usr/lib
linker_tool=/usr/bin/ld.*
linker_tool=/usr/bin/ld

View File

@@ -1,3 +1,3 @@
libs=c\+\+;c\+\+abi;pthread;m;compiler_rt;c;compiler_rt
dirs=/usr/lib
linker_tool=/usr/bin/ld.*
linker_tool=/usr/bin/ld