Commit ffb96cf
committed
fix(random): LINK.EXE reads
The MSVC conformance row still failed after the last commit named the
library, because it named it in the other side's spelling. `ldflags`
reaches the command line verbatim, and the two rows this predicate
selects do not drive the same program:
LINK : warning LNK4044: unrecognized option '/lbcrypt'; ignored
random.obj : error LNK2019: unresolved external symbol
__imp_BCryptGenRandom
clang drives lld-link and translates GNU spellings for it; `msvc@system`
drives LINK.EXE directly, and LINK reads `-` and `/` as the same option
prefix.
One spelling serves both. Measured, rather than assumed, before changing
the row that was already green:
clang --target=x86_64-pc-windows-msvc -fuse-ld=lld -### t.c bcrypt.lib
→ 'bcrypt.lib'
clang --target=x86_64-pc-windows-msvc -fuse-ld=lld -### t.c -lbcrypt
→ "bcrypt.lib"
The clang link line is byte-identical under both, so this cannot regress
the row it is not aimed at.-lbcrypt as an option named l
1 parent 2aee72e commit ffb96cf
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
69 | 85 | | |
70 | | - | |
| 86 | + | |
71 | 87 | | |
72 | 88 | | |
73 | 89 | | |
| |||
0 commit comments