forked from OSchip/llvm-project
Define -build-id=tree as a synonym for -build-id=sha1.
Our build-id is a tree hash anyway, so I'll define this as a synonym for sha1. GNU gold takes this parameter, so this is for compatibility with that. llvm-svn: 287119
This commit is contained in:
parent
ff51f011d1
commit
cb87675186
|
@ -561,7 +561,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
|
|||
StringRef S = Arg->getValue();
|
||||
if (S == "md5") {
|
||||
Config->BuildId = BuildIdKind::Md5;
|
||||
} else if (S == "sha1") {
|
||||
} else if (S == "sha1" || S == "tree") {
|
||||
Config->BuildId = BuildIdKind::Sha1;
|
||||
} else if (S == "uuid") {
|
||||
Config->BuildId = BuildIdKind::Uuid;
|
||||
|
|
|
@ -1,29 +1,39 @@
|
|||
# REQUIRES: x86
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
||||
# RUN: ld.lld --build-id %t -o %t2
|
||||
|
||||
# RUN: ld.lld --build-id %t -o %t2 -threads
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=DEFAULT %s
|
||||
# RUN: ld.lld --build-id=md5 %t -o %t2
|
||||
# RUN: ld.lld --build-id %t -o %t2 -no-threads
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=DEFAULT %s
|
||||
|
||||
# RUN: ld.lld --build-id=md5 %t -o %t2 -threads
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=MD5 %s
|
||||
# RUN: ld.lld --build-id=sha1 %t -o %t2
|
||||
# RUN: ld.lld --build-id=md5 %t -o %t2 -no-threads
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=MD5 %s
|
||||
|
||||
# RUN: ld.lld --build-id=sha1 %t -o %t2 -threads
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=SHA1 %s
|
||||
# RUN: ld.lld --build-id=sha1 %t -o %t2 -no-threads
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=SHA1 %s
|
||||
|
||||
# RUN: ld.lld --build-id=tree %t -o %t2 -threads
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=SHA1 %s
|
||||
# RUN: ld.lld --build-id=tree %t -o %t2 -no-threads
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=SHA1 %s
|
||||
|
||||
# RUN: ld.lld --build-id=uuid %t -o %t2
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=UUID %s
|
||||
|
||||
# RUN: ld.lld --build-id=0x12345678 %t -o %t2
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=HEX %s
|
||||
|
||||
# RUN: ld.lld %t -o %t2
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=NONE %s
|
||||
|
||||
# RUN: ld.lld --build-id=md5 --build-id=none %t -o %t2
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=NONE %s
|
||||
|
||||
## Multithreaded cases:
|
||||
# RUN: ld.lld --build-id -threads %t -o %t2
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=DEFAULT %s
|
||||
# RUN: ld.lld --build-id=md5 -threads %t -o %t2
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=MD5 %s
|
||||
# RUN: ld.lld --build-id=sha1 -threads %t -o %t2
|
||||
# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=SHA1 %s
|
||||
|
||||
.globl _start
|
||||
_start:
|
||||
nop
|
||||
|
|
Loading…
Reference in New Issue