]> granicus.if.org Git - clang/commitdiff
Merging r214208:
authorBob Wilson <bob.wilson@apple.com>
Tue, 29 Jul 2014 23:48:32 +0000 (23:48 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 29 Jul 2014 23:48:32 +0000 (23:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@214257 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/ToolChain.h
lib/Driver/ToolChains.h
test/Driver/linker-opts.c

index c9a6c4b57f217a88826f9b5f60065fb8200745be..550e4dfc60c3a4e304d888501ff5790d2fb1fd0e 100644 (file)
@@ -116,9 +116,6 @@ public:
   StringRef getPlatform() const { return Triple.getVendorName(); }
   StringRef getOS() const { return Triple.getOSName(); }
 
-  /// \brief Returns true if the toolchain is targeting a non-native architecture.
-  bool isCrossCompiling() const;
-
   /// \brief Provide the default architecture name (as expected by -arch) for
   /// this toolchain. Note t
   std::string getDefaultUniversalArchName() const;
@@ -171,6 +168,10 @@ public:
 
   // Platform defaults information
 
+  /// \brief Returns true if the toolchain is targeting a non-native
+  /// architecture.
+  virtual bool isCrossCompiling() const;
+
   /// HasNativeLTOLinker - Check whether the linker and related tools have
   /// native LLVM support.
   virtual bool HasNativeLLVMSupport() const;
index 8e5cf049393a481b6519b75cbef737f36778db42..73d6959371133556315617290b944b8912f5b1de 100644 (file)
@@ -427,6 +427,11 @@ public:
   /// @name ToolChain Implementation
   /// {
 
+  // Darwin tools support multiple architecture (e.g., i386 and x86_64) and
+  // most development is done against SDKs, so compiling for a different
+  // architecture should not get any special treatment.
+  bool isCrossCompiling() const override { return false; }
+
   llvm::opt::DerivedArgList *
   TranslateArgs(const llvm::opt::DerivedArgList &Args,
                 const char *BoundArch) const override;
index 3fc95ec7d24d99356382ca4c9f2f190d43757133..24866a63b1fd9a333889c467e239c01e7d975c9e 100644 (file)
@@ -5,3 +5,7 @@
 // XFAIL: win32
 // REQUIRES: clang-driver
 // REQUIRES: native
+
+// Make sure that LIBRARY_PATH works for both i386 and x86_64 on Darwin.
+// RUN: env LIBRARY_PATH=%T/test1 %clang -target x86_64-apple-darwin %s -### 2>&1 | FileCheck %s
+// RUN: env LIBRARY_PATH=%T/test1 %clang -target i386-apple-darwin  %s -### 2>&1 | FileCheck %s