Building GHC head with clang on Mavericks
Carter Schonwald
carter.schonwald at gmail.com
Wed Nov 20 03:36:32 UTC 2013
Yes. So we agree.
Clang only works with ghc when passed that flag. Hence for building ghc,
clang should only be called via a wrapper script if the host ghc is 7.6 or
older.
The whole point of the clang wrapper script is to pass that flag.
Nicks patch to Alex and happy is to address a further quirk of clang cpp.
Was there an issue if you used a wrapped clang and those patches or not?
I'm really confused.
Cheers
-carter
On Tuesday, November 19, 2013, Kazu Yamamoto wrote:
> Hi,
>
> > No. What I found is that the current design of the clang-wrapper hack
> > is appropriate.
> >
> > "-x assembler-with-cpp" is necessary to rescue
> > ----
> > {-# RULE whatever
> > #-}
> > ---
>
> I read the source of clang. The argument of "-x" is defined in
> lib/Frontend/CompilerInvocation.cpp:
>
> .Case("c", IK_C)
> .Case("cl", IK_OpenCL)
> .Case("cuda", IK_CUDA)
> .Case("c++", IK_CXX)
> .Case("objective-c", IK_ObjC)
> .Case("objective-c++", IK_ObjCXX)
> .Case("cpp-output", IK_PreprocessedC)
> .Case("assembler-with-cpp", IK_Asm)
> .Case("c++-cpp-output", IK_PreprocessedCXX)
> .Case("objective-c-cpp-output", IK_PreprocessedObjC)
> .Case("objc-cpp-output", IK_PreprocessedObjC)
> .Case("objective-c++-cpp-output", IK_PreprocessedObjCXX)
> .Case("objc++-cpp-output", IK_PreprocessedObjCXX)
> .Case("c-header", IK_C)
> .Case("cl-header", IK_OpenCL)
> .Case("objective-c-header", IK_ObjC)
> .Case("c++-header", IK_CXX)
> .Case("objective-c++-header", IK_ObjCXX)
> .Cases("ast", "pcm", IK_AST)
> .Case("ir", IK_LLVM_IR)
>
> In my experiment, no argument except "assembler-with-cpp" can rescue
> " #-}".
>
> --Kazu
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org <javascript:;>
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20131119/962353be/attachment.html>
More information about the ghc-devs
mailing list