[GHC] #8197: telling people how to use GHC 7.6 correctly with Xcode 5/ OS X Mavericks
GHC
ghc-devs at haskell.org
Thu Aug 29 20:18:47 UTC 2013
#8197: telling people how to use GHC 7.6 correctly with Xcode 5/ OS X Mavericks
---------------------------------+----------------------------------
Reporter: carter | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Resolution: | Keywords:
Operating System: MacOS X | Architecture: x86_64 (amd64)
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
---------------------------------+----------------------------------
Comment (by carter):
luke ianni's wrapper (which we should explore cleaning up)
can be found here
https://gist.github.com/lukexi/e11668ced04524564a8b
{{{
import System.Environment
import System.Process
flags =
[ "-Wno-invalid-pp-token"
, "-Wno-unicode"
, "-Wno-trigraphs"
]
-- See if we're in preprocessor mode
check args@("-E":"-undef":"-traditional":_) = replace args
check other = other
-- make sure we use assembler-with-cpp
replace ("-x":"c":xs) = "-x":"assembler-with-cpp":replace xs
replace (x:xs) = x:replace xs
replace [] = []
main = do
args <- getArgs
rawSystem clang $ flags ++ (check args)
clang = "/usr/bin/clang" -- system clang
--clang = "/usr/local/bin/clang" -- clang 3.4/HEAD
--clang = "/usr/local/clang-3.0/bin/clang"
--clang = "/Users/lukexi/bin/clang-3.2/bin/clang"
--clang = "/Users/lukexi/bin/clang-3.3/bin/clang"
}}}
NOTE: this is for XCODE 5 / OS X Mavericks only.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8197#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list