forked from OSchip/llvm-project
PR21000: pass -I options to assembler
Pass -I options to assembly so it can find files included with .include. Differential Revision: http://reviews.llvm.org/D7472 llvm-svn: 235915
This commit is contained in:
parent
017ebf09d9
commit
8fe8ed56ee
|
@ -5115,6 +5115,9 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
// assembler on assembly source files.
|
// assembler on assembly source files.
|
||||||
CmdArgs.push_back("-dwarf-debug-producer");
|
CmdArgs.push_back("-dwarf-debug-producer");
|
||||||
CmdArgs.push_back(Args.MakeArgString(getClangFullVersion()));
|
CmdArgs.push_back(Args.MakeArgString(getClangFullVersion()));
|
||||||
|
|
||||||
|
// And pass along -I options
|
||||||
|
Args.AddAllArgs(CmdArgs, options::OPT_I);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optionally embed the -cc1as level arguments into the debug info, for build
|
// Optionally embed the -cc1as level arguments into the debug info, for build
|
||||||
|
@ -7584,6 +7587,7 @@ void gnutools::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
if (NeedsKPIC)
|
if (NeedsKPIC)
|
||||||
addAssemblerKPIC(Args, CmdArgs);
|
addAssemblerKPIC(Args, CmdArgs);
|
||||||
|
|
||||||
|
Args.AddAllArgs(CmdArgs, options::OPT_I);
|
||||||
Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
|
Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
|
||||||
options::OPT_Xassembler);
|
options::OPT_Xassembler);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
// PR21000: Test that -I is passed to assembler.
|
||||||
|
// RUN: %clang -### -c -no-integrated-as %s -Ifoo_dir 2>&1 | FileCheck --check-prefix=BARE_INCLUDE1 %s
|
||||||
|
// BARE_INCLUDE1: "-I" "foo_dir"
|
||||||
|
|
||||||
|
// RUN: %clang -### -c -no-integrated-as %s -I foo_dir 2>&1 | FileCheck --check-prefix=BARE_INCLUDE2 %s
|
||||||
|
// BARE_INCLUDE2: "-I" "foo_dir"
|
||||||
|
|
||||||
|
// RUN: %clang -### -c -integrated-as %s -Ifoo_dir 2>&1 | FileCheck --check-prefix=BARE_INT_INCLUDE1 %s
|
||||||
|
// BARE_INT_INCLUDE1: "-I" "foo_dir"
|
||||||
|
|
||||||
|
// RUN: %clang -### -c -integrated-as %s -I foo_dir 2>&1 | FileCheck --check-prefix=BARE_INT_INCLUDE2 %s
|
||||||
|
// BARE_INT_INCLUDE2: "-I" "foo_dir"
|
Loading…
Reference in New Issue