Skip to content

Commit

Permalink
fixed codegen, default target
Browse files Browse the repository at this point in the history
  • Loading branch information
ncave committed Oct 20, 2018
1 parent d6e04c7 commit dcecef2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion fcs/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ Target "CodeGen.Fable" (fun _ ->
// Fable-specific (comment the #line directive as it is not supported)
["lex.fs"; "pplex.fs"; "illex.fs"; "ilpars.fs"; "pars.fs"; "pppars.fs"]
|> Seq.map (fun fileName -> outDir + fileName)
|> RegexReplaceInFilesWithEncoding @"# (?=\d)" "//# " Text.Encoding.UTF8
|> RegexReplaceInFilesWithEncoding @"(?<!/)# (?=\d)" "//# " Text.Encoding.UTF8

// prevent stack overflows on large files (make lexer rules inline)
let pattern = @"(?<=and )(?!inline )([a-zA-Z]+ )+ *\(lexbuf "
["lex.fs"; "pplex.fs"; "illex.fs"]
|> Seq.map (fun fileName -> outDir + fileName)
|> RegexReplaceInFilesWithEncoding pattern @"inline $0" Text.Encoding.UTF8
)

Target "GenerateDocsEn" (fun _ ->
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/CompileOps.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5402,7 +5402,7 @@ type TcConfig (optimize: bool, defines: string list) =
member x.emitDebugInfoInQuotations = false
member x.errorSeverityOptions = FSharpErrorSeverityOptions.Default
member x.light = Some true
member x.target = CompilerTarget.WinExe
member x.target = CompilerTarget.Dll
member x.extraOptimizationIterations = if optimize then 0 else 0
#if DEBUG
member x.showOptimizationData = false
Expand Down

0 comments on commit dcecef2

Please sign in to comment.