mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Added failing if assembly compiler failed
This commit is contained in:
parent
a4e297648c
commit
4fdbb18843
1 changed files with 8 additions and 2 deletions
|
|
@ -1505,11 +1505,17 @@ let build cmd prog =
|
|||
(Buffer.contents buf) cmd#get_runtime_path
|
||||
(match cmd#march with `X86_32 -> "runtime32" | `AMD64 -> "runtime")
|
||||
in
|
||||
Sys.command gcc_cmdline
|
||||
let result = Sys.command gcc_cmdline in
|
||||
if result <> 0 then
|
||||
failwith
|
||||
(Printf.sprintf "Assembly compiler failed with exit code %d" result)
|
||||
| `Compile ->
|
||||
let cmd =
|
||||
Printf.sprintf "%s %s %s -c -g %s.s" compiler compiler_flags debug_flags
|
||||
cmd#basename
|
||||
in
|
||||
Sys.command cmd
|
||||
let result = Sys.command cmd in
|
||||
if result <> 0 then
|
||||
failwith
|
||||
(Printf.sprintf "Assembly compiler failed with exit code %d" result)
|
||||
| _ -> invalid_arg "must not happen"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue