Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions test/blechc/TestCodegeneration.fs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

let BLECH_SUFFIX = ".blc"
let C_SUFFIX = ".c"
let OBJ_SUFFIX = ".obj"
let EXE_SUFFIX = ".exe"
//let OBJ_SUFFIX = ".o"
//let EXE_SUFFIX = ".exe"
//let EXE_SUFFIX = ""
let EXT_SUFFIX = ".ext"
let IMP_SUFFIX = "_imp"
let EXT_C = EXT_SUFFIX + ".c"
Expand All @@ -28,6 +29,27 @@ let SPEC_SUFFIX = ".spec.json"
let TEST_SUFFIX = ".test.json"
let CUR_DIR = "" //default setting for ProcessStartInfo.WorkingDirectory

open System

type OS =
| OSX
| Windows
| Linux
let getOS =
match int Environment.OSVersion.Platform with
| 4 | 128 -> Linux
| 6 -> OSX
| _ -> Windows

let EXE_SUFFIX =
match getOS with
| Windows -> ".exe"
| _ -> ""
let OBJ_SUFFIX =
match getOS with
| Windows ->".obj"
| _ -> ".o"

module DiffJSON =

open FSharp.Data
Expand Down