Show commands to run and use verbose output.
-=item B<--working-directory>
-
-Use the given argument as the effective working directory to run the compiler
-in. This is useful for running the compiler as if in a specific working
-directory without the overhead of having to change directory using an auxiliary
-process.
-
=back
def _version : Flag<"--version">;
def _warn__EQ : Joined<"--warn-=">, Alias<W_Joined>;
def _warn_ : Joined<"--warn-">, Alias<W_Joined>;
-def _working_directory : Separate<"--working-directory">,
- HelpText<"Use the given argument as the effective working directory">;
def _write_dependencies : Flag<"--write-dependencies">, Alias<MD>;
def _write_user_dependencies : Flag<"--write-user-dependencies">, Alias<MMD>;
def _ : Joined<"--">, Flags<[Unsupported]>;
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
-#include "llvm/Support/Process.h"
#include "InputInfo.h"
if (Args->hasArg(options::OPT_nostdlib))
UseStdLib = false;
- // Honor --working-directory. Eventually we want to handle this completely
- // internally to support good use as a library, but for now we just change our
- // working directory.
- if (const Arg *A = Args->getLastArg(options::OPT__working_directory)) {
- llvm::sys::Process::SetWorkingDirectory(A->getValue(*Args));
- }
-
Host = GetHostInfo(DefaultHostTriple.c_str());
// Perform the default argument translations.
+++ /dev/null
-// RUN: touch %t.h
-// RUN: echo '#include "%t.h"' > %t.c
-// RUN: %clang --working-directory %t -fsyntax-only %t.c