diff --git a/shake-ats.cabal b/shake-ats.cabal
--- a/shake-ats.cabal
+++ b/shake-ats.cabal
@@ -1,5 +1,5 @@
 name:                shake-ats
-version:             0.1.0.4
+version:             0.2.0.0
 synopsis:            Utilities for building ATS projects with shake
 description:         Various helper functions for building [ATS](http://www.ats-lang.org/) with the [shake](http://shakebuild.com/) library
 homepage:            https://github.com/vmchale/shake-ats#readme
diff --git a/src/Development/Shake/ATS.hs b/src/Development/Shake/ATS.hs
--- a/src/Development/Shake/ATS.hs
+++ b/src/Development/Shake/ATS.hs
@@ -70,14 +70,16 @@
     where g = [ join $ replicate i "../" | i <- [1..n] ]
 
 -- TODO musl?
-atsBin :: Version -- ^ Library version
+atsBin :: String -- ^ C compiler we should use
+       -> [String] -- ^ Flags to pass to the C compiler
+       -> Version -- ^ Library version
        -> Version -- ^ Compiler version
        -> Bool -- ^ Whether to use the garbage collector
        -> [String] -- ^ A list of libraries against which to link
        -> String -- ^ Source file
        -> String -- ^ Binary target
        -> Rules ()
-atsBin v v' gc libs sourceFile out =
+atsBin cc cFlags v v' gc libs sourceFile out =
 
     out %> \_ -> do
         sources <- transitiveDeps [sourceFile]
@@ -93,7 +95,7 @@
         command
             [EchoStderr False, AddEnv "PATSHOME" home, AddEnv "PATH" (home ++ "/bin:" ++ path), AddEnv "PATSHOMELOCS" $ patsHomeLocs 5]
             (home ++ "/bin/patscc")
-            ([sourceFile, "-atsccomp", "gcc -flto -I" ++ h ++ "/ccomp/runtime/ -I" ++ h ++ " -L" ++ h' ++ "/lib", gcFlag gc, "-o", out, "-cleanaft", "-O2", "-mtune=native", "-flto"] <> toLibs libs')
+            ([sourceFile, "-atsccomp", cc ++ " -I" ++ h ++ "/ccomp/runtime/ -I" ++ h ++ " -L" ++ h' ++ "/lib", gcFlag gc, "-o", out, "-cleanaft"] <> cFlags <> toLibs libs')
 
 -- | Build a @.lats@ file.
 atsLex :: Rules ()
