mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Prepare LLVM to fix PR14625, exposing a hook in MCContext to manage the
compilation directory. This defaults to the current working directory, just as it always has, but now an assembler can choose to override it with a custom directory. I've taught llvm-mc about this option and added a test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170371 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -157,6 +157,10 @@ static cl::opt<bool>
|
||||
GenDwarfForAssembly("g", cl::desc("Generate dwarf debugging info for assembly "
|
||||
"source files"));
|
||||
|
||||
static cl::opt<std::string>
|
||||
DebugCompilationDir("fdebug-compilation-dir",
|
||||
cl::desc("Specifies the debug info's compilation dir"));
|
||||
|
||||
enum ActionType {
|
||||
AC_AsLex,
|
||||
AC_Assemble,
|
||||
@ -389,8 +393,10 @@ int main(int argc, char **argv) {
|
||||
Ctx.setAllowTemporaryLabels(false);
|
||||
|
||||
Ctx.setGenDwarfForAssembly(GenDwarfForAssembly);
|
||||
if (!DwarfDebugFlags.empty())
|
||||
if (!DwarfDebugFlags.empty())
|
||||
Ctx.setDwarfDebugFlags(StringRef(DwarfDebugFlags));
|
||||
if (!DebugCompilationDir.empty())
|
||||
Ctx.setCompilationDir(DebugCompilationDir);
|
||||
|
||||
// Package up features to be passed to target/subtarget
|
||||
std::string FeaturesStr;
|
||||
|
Reference in New Issue
Block a user