on master help sign in
Do not split arguments indiscriminately on spaces
28c596bNiklas Larsson
src/IRTS/CodegenC.hs+4−4
@@ -81,10 +81,10 @@ codegenC' defs out exec incs objs libs flags exports iface dbg
81 "-I."] ++ objs ++ envFlags ++
81 "-I."] ++ objs ++ envFlags ++
82 (if (exec == Executable) then [] else ["-c"]) ++
82 (if (exec == Executable) then [] else ["-c"]) ++
83 [tmpn] ++
83 [tmpn] ++
84− (if not iface then concatMap words libFlags else []) ++
84+ (if not iface then libFlags else []) ++
85− concatMap words incFlags ++
85+ incFlags ++
86− (if not iface then concatMap words libs else []) ++
86+ (if not iface then libs else []) ++
87− concatMap words flags ++
87+ flags ++
88 ["-o", out]
88 ["-o", out]
89-- putStrLn (show args)
89-- putStrLn (show args)
90 exit <- rawSystem comp args
90 exit <- rawSystem comp args
src/Idris/Directives.hs+4−2
@@ -21,8 +21,10 @@ directiveAction (DLink cgn obj) = do dirs <- allImportDirs
21 addIBC (IBCObj cgn obj) -- just name, search on loading ibc
21 addIBC (IBCObj cgn obj) -- just name, search on loading ibc
22 addObjectFile cgn o
22 addObjectFile cgn o
23
23
24−directiveAction (DFlag cgn flag) = do addIBC (IBCCGFlag cgn flag)
24+directiveAction (DFlag cgn flag) = do
25+ let flags = words flag
26+ mapM_ (\f -> addIBC (IBCCGFlag cgn f)) flags
25− addFlag cgn flag
27+ mapM_ (addFlag cgn) flags
26
28
27directiveAction (DInclude cgn hdr) = do addHdr cgn hdr
29directiveAction (DInclude cgn hdr) = do addHdr cgn hdr
28 addIBC (IBCHeader cgn hdr)
30 addIBC (IBCHeader cgn hdr)