[LLVMbugs] [Bug 19776] New: Adding triple support for non-OSX Darwin OS

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 18 01:35:17 PDT 2014


            Bug ID: 19776
           Summary: Adding triple support for non-OSX Darwin OS
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: drppublic at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Currently, non-OSX Darwin targets do not have a separate triple string. I.e:
cross-compiling llvm/clang with with following command:

CC='clang' CXX='clang++' cmake -G "Unix Makefiles" ../llvm/
-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-aVendor-darwin13.1.0 \
-DCMAKE_CXX_FLAGS="-target x86_64-aVendor-darwin13.1.0"

Results in a clang driver that automatically inserts the triple argument:
-triple x86_64-aVendor-macosx10.9.0
where it should be:
-triple x86_64-aVendor-darwin13.1.0

(See http://lists.cs.uiuc.edu/pipermail/cfe-users/2014-May/000481.html for full
test description).

This issue could be resolved with the following steps:

1) Adding "DarwinOS" as an additional identifier in the
clang::driver::toolchains::Darwin DarwinPlatformKind enum in Toolchains.h in
llvm/tools/clang/lib/Driver/ (line 328)

2) Slightly modifying the logic in
(Toolchains.cpp, line 186) from:

  Str += isTargetIOSBased() ? "ios" : "macosx";


  if (!isTargetIOSBased() && !isTargetMacOS())
    Str += "darwin";
    Str += isTargetIOSBased() ? "ios" : "macosx";

3) Altering the Darwin/OSX versioning logic to accommodate true Darwin Versions
for Triple::Darwin triples.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140518/7b95c035/attachment.html>

More information about the llvm-bugs mailing list