summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/docs/tools/clang.pod7
-rw-r--r--clang/include/clang/Driver/Options.td2
-rw-r--r--clang/lib/Driver/Driver.cpp8
-rw-r--r--clang/test/Driver/working-directory.c3
4 files changed, 0 insertions, 20 deletions
diff --git a/clang/docs/tools/clang.pod b/clang/docs/tools/clang.pod
index abecd1c8ef5..704cc8743ba 100644
--- a/clang/docs/tools/clang.pod
+++ b/clang/docs/tools/clang.pod
@@ -407,13 +407,6 @@ Print timing summary of each stage of compilation.
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
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 770b7d86f9f..3f48b96d758 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -855,8 +855,6 @@ def _verbose : Flag<"--verbose">, Alias<v>;
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]>;
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 711b7dbe181..6f49bec01bf 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -38,7 +38,6 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
-#include "llvm/Support/Process.h"
#include "InputInfo.h"
@@ -324,13 +323,6 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
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.
diff --git a/clang/test/Driver/working-directory.c b/clang/test/Driver/working-directory.c
deleted file mode 100644
index 26ae55f6fcd..00000000000
--- a/clang/test/Driver/working-directory.c
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: touch %t.h
-// RUN: echo '#include "%t.h"' > %t.c
-// RUN: %clang --working-directory %t -fsyntax-only %t.c
OpenPOWER on IntegriCloud