Skip to content

Commit b801a7d

Browse files
committed
Driver: Enable address-significance tables by default when targeting COFF.
Differential Revision: https://reviews.llvm.org/D51049 llvm-svn: 340552
1 parent 315334b commit b801a7d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4857,7 +4857,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
48574857
}
48584858

48594859
if (Args.hasFlag(options::OPT_faddrsig, options::OPT_fno_addrsig,
4860-
getToolChain().getTriple().isOSBinFormatELF() &&
4860+
(getToolChain().getTriple().isOSBinFormatELF() ||
4861+
getToolChain().getTriple().isOSBinFormatCOFF()) &&
48614862
getToolChain().useIntegratedAs()))
48624863
CmdArgs.push_back("-faddrsig");
48634864

clang/test/Driver/addrsig.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %clang -### -target x86_64-unknown-linux -c %s 2>&1 | FileCheck -check-prefix=ADDRSIG %s
2+
// RUN: %clang -### -target x86_64-pc-win32 -c %s 2>&1 | FileCheck -check-prefix=ADDRSIG %s
23
// RUN: %clang -### -target x86_64-unknown-linux -fno-integrated-as -c %s 2>&1 | FileCheck -check-prefix=NO-ADDRSIG %s
34
// RUN: %clang -### -target x86_64-unknown-linux -fno-integrated-as -faddrsig -c %s 2>&1 | FileCheck -check-prefix=ADDRSIG %s
45
// RUN: %clang -### -target x86_64-unknown-linux -fno-addrsig -c %s 2>&1 | FileCheck -check-prefix=NO-ADDRSIG %s

0 commit comments

Comments
 (0)