Similar to what ld64 does here: https://github.com/apple-opensource/ld64/blob/e28c028b20af187a16a7161d89e91868a450cadc/src/ld/OutputFile.cpp#L3724
Details
- Reviewers
thakis int3 keith - Group Reviewers
Restricted Project - Commits
- rGa9e325116ca8: Add output filename to UUID hash
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lld/MachO/Writer.cpp | ||
---|---|---|
1089 | I think this needs to use final_output and not output, the difference being when you use clang to compile a multi-arch binary output is a randomized name, so this breaks hermetic builds |
lld/MachO/Writer.cpp | ||
---|---|---|
1089 | Can you add a test covering this case to show it's preferred? |
lgtm
lld/test/MachO/uuid.s | ||
---|---|---|
6 | jfyi, the awk isn't super necessary since FileCheck does substring matching by default. but I'm fine if you prefer this for clarity |
lld/test/MachO/uuid.s | ||
---|---|---|
6 | We need it for cmp to work (but maybe there are better ways to check for string equality? I went this way after I couldn't figure out how to do it purely via FileCheck) |
lld/test/MachO/uuid.s | ||
---|---|---|
6 | d'oh, yes, I forgot that llvm-dwarfdump --uuid included the filename in its output. nevermind :) |
lld/test/MachO/uuid.s | ||
---|---|---|
6 | just FYI, this is the only test that invokes awk AFAICT and it's breaking our windows buildbot which doesn't have awk I've marked this test as unsupported on windows in 79a9fe6c8afeff727ac60e6c7abe24f02df5a9a4 |
lld/test/MachO/uuid.s | ||
---|---|---|
6 | Is cut available? |
I think this needs to use final_output and not output, the difference being when you use clang to compile a multi-arch binary output is a randomized name, so this breaks hermetic builds