Building GHC head with clang on Mavericks
Kazu Yamamoto (=?iso-2022-jp?B?GyRCOzNLXE9CSScbKEI=?=)
kazu at iij.ad.jp
Wed Nov 20 00:55:07 UTC 2013
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
More information about the ghc-devs
mailing list