diff options
| author | Logan Chien <tzuhsiang.chien@gmail.com> | 2014-06-26 14:23:45 +0000 |
|---|---|---|
| committer | Logan Chien <tzuhsiang.chien@gmail.com> | 2014-06-26 14:23:45 +0000 |
| commit | bab68c96f15867af6938d9c8f922d59d31351cad (patch) | |
| tree | 47fb6b8c820ff237794df8704e8acb45d8e77d53 /include | |
| parent | daf050d8a730bf72d691fd05be0259adfb58e235 (diff) | |
| download | clang-bab68c96f15867af6938d9c8f922d59d31351cad.tar.gz clang-bab68c96f15867af6938d9c8f922d59d31351cad.tar.bz2 clang-bab68c96f15867af6938d9c8f922d59d31351cad.tar.xz | |
Implement the -fuse-ld= option.
This commit implements the -fuse-ld= option, so that the user
can specify -fuse-ld=bfd to use ld.bfd.
This commit re-applies r194328 with some test case changes.
It seems that r194328 was breaking macosx or mingw build
because clang can't find ld.bfd or ld.gold in the given sysroot.
We should use -B to specify the executable search path instead.
Patch originally by David Chisnall.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
| -rw-r--r-- | include/clang/Basic/DiagnosticDriverKinds.td | 2 | ||||
| -rw-r--r-- | include/clang/Driver/Options.td | 2 | ||||
| -rw-r--r-- | include/clang/Driver/ToolChain.h | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td index 7de2250134..957019ee62 100644 --- a/include/clang/Basic/DiagnosticDriverKinds.td +++ b/include/clang/Basic/DiagnosticDriverKinds.td @@ -22,6 +22,8 @@ def err_drv_unknown_stdin_type_clang_cl : Error< def err_drv_unknown_language : Error<"language not recognized: '%0'">; def err_drv_invalid_arch_name : Error< "invalid arch name '%0'">; +def err_drv_invalid_linker_name : Error< + "invalid linker name in argument '%0'">; def err_drv_invalid_rtlib_name : Error< "invalid runtime library name in argument '%0'">; def err_drv_unsupported_rtlib_for_platform : Error< diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index dd8722e1b4..95f13cc384 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1542,7 +1542,7 @@ def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<clang_ignored_f_Group>; defm profile_use : BooleanFFlag<"profile-use">, Group<clang_ignored_f_Group>; def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, Group<clang_ignored_f_Group>; -def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<clang_ignored_f_Group>; +def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>; defm align_functions : BooleanFFlag<"align-functions">, Group<clang_ignored_f_Group>; def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<clang_ignored_f_Group>; diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h index f3db2c1c90..c9a6c4b57f 100644 --- a/include/clang/Driver/ToolChain.h +++ b/include/clang/Driver/ToolChain.h @@ -158,6 +158,10 @@ public: std::string GetFilePath(const char *Name) const; std::string GetProgramPath(const char *Name) const; + /// Returns the linker path, respecting the -fuse-ld= argument to determine + /// the linker suffix or name. + std::string GetLinkerPath() const; + /// \brief Dispatch to the specific toolchain for verbose printing. /// /// This is used when handling the verbose option to print detailed, |
