mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Disable x32 when os_type = Darwin
Signed-off-by: Kakadu <Kakadu@pm.me>
This commit is contained in:
parent
59273f734e
commit
8a8fc3432b
10 changed files with 22 additions and 28 deletions
2
Makefile
2
Makefile
|
|
@ -10,7 +10,7 @@ BUILDDIR = _build
|
||||||
all: build test
|
all: build test
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dune b src runtime runtime32 stdlib
|
dune b src runtime runtime32 stdlib tutorial
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
dune b @install --profile=release
|
dune b @install --profile=release
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
; This file was autogenerated
|
; This file was autogenerated
|
||||||
|
|
||||||
(cram (deps ../src/Driver.exe ../runtime/Std.i ../runtime32/Std.i))
|
(cram (deps ../src/Driver.exe ../runtime/Std.i))
|
||||||
|
|
||||||
(cram (applies_to test001)
|
(cram (applies_to test001)
|
||||||
(deps test001.lama test001.input))
|
(deps test001.lama test001.input))
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ let () =
|
||||||
Out_channel.with_open_text "dune" (fun dunech ->
|
Out_channel.with_open_text "dune" (fun dunech ->
|
||||||
let dprintfn fmt = Format.kasprintf (Printf.fprintf dunech "%s\n") fmt in
|
let dprintfn fmt = Format.kasprintf (Printf.fprintf dunech "%s\n") fmt in
|
||||||
dprintfn "; This file was autogenerated\n";
|
dprintfn "; This file was autogenerated\n";
|
||||||
dprintfn "(cram (deps ../src/Driver.exe ../runtime/Std.i ../runtime32/Std.i))\n";
|
dprintfn "(cram (deps ../src/Driver.exe ../runtime/Std.i))\n";
|
||||||
|
|
||||||
for i = 0 to count - 1 do
|
for i = 0 to count - 1 do
|
||||||
let cram_buf = Buffer.create 100 in
|
let cram_buf = Buffer.create 100 in
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,3 @@ let () =
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
(*
|
|
||||||
let () =
|
|
||||||
|
|
||||||
for i=0 to count do
|
|
||||||
if Sys.file_exists (Printf.sprintf "generated%05d.lama" i) then
|
|
||||||
(Printf.fprintf ch "(cram (applies_to r%05d)\n" i;
|
|
||||||
Printf.fprintf ch " (deps generated%05d.lama))\n%!" i;)
|
|
||||||
done *)
|
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,4 @@ let () =
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
(*
|
|
||||||
let () =
|
|
||||||
|
|
||||||
for i=0 to count do
|
|
||||||
if Sys.file_exists (Printf.sprintf "generated%05d.lama" i) then
|
|
||||||
(Printf.fprintf ch "(cram (applies_to r%05d)\n" i;
|
|
||||||
Printf.fprintf ch " (deps generated%05d.lama))\n%!" i;)
|
|
||||||
done *)
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
(rule
|
(rule
|
||||||
(target runtime.a)
|
(target runtime.a)
|
||||||
|
(enabled_if
|
||||||
|
(<> %{ocaml-config:os_type} "Darwin"))
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
(deps Makefile gc_runtime.s runtime.c runtime.h)
|
(deps Makefile gc_runtime.s runtime.c runtime.h)
|
||||||
(action
|
(action
|
||||||
(run make)))
|
(run make -j2)))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
(rule
|
(rule
|
||||||
|
(enabled_if
|
||||||
|
(<> %{ocaml-config:os_type} "Darwin"))
|
||||||
(deps
|
(deps
|
||||||
../Makefile
|
../Makefile
|
||||||
../../runtime32/Std.i
|
../../runtime32/Std.i
|
||||||
|
|
@ -51,9 +53,6 @@
|
||||||
(setenv
|
(setenv
|
||||||
SRCDIR
|
SRCDIR
|
||||||
".."
|
".."
|
||||||
; (setenv
|
|
||||||
; FILES
|
|
||||||
; "List.lama Buffer.lama Collection.lama Data.lama Fun.lama"
|
|
||||||
(setenv
|
(setenv
|
||||||
LAMA
|
LAMA
|
||||||
"../../runtime32"
|
"../../runtime32"
|
||||||
|
|
|
||||||
|
|
@ -50,15 +50,10 @@
|
||||||
(setenv
|
(setenv
|
||||||
SRCDIR
|
SRCDIR
|
||||||
".."
|
".."
|
||||||
; (setenv
|
|
||||||
; FILES
|
|
||||||
; "List.lama Buffer.lama Collection.lama Data.lama Fun.lama"
|
|
||||||
(setenv
|
(setenv
|
||||||
LAMA
|
LAMA
|
||||||
"../../runtime"
|
"../../runtime"
|
||||||
(setenv
|
(setenv
|
||||||
LAMAC
|
LAMAC
|
||||||
"../../src/Driver.exe -march=amd64 -I ../runtime32"
|
"../../src/Driver.exe -march=amd64 -I ../runtime"
|
||||||
(run make -j2 -f ../Makefile all)))))))
|
(run make -j2 -f ../Makefile all)))))))
|
||||||
|
|
||||||
;)
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Expressions.x32.exe)
|
(targets Expressions.x32.exe)
|
||||||
|
(enabled_if (<> %{ocaml-config:os_type} "Darwin"))
|
||||||
(deps (:lama Expressions.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
(deps (:lama Expressions.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -21,6 +22,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Expressions.x64.exe)
|
(targets Expressions.x64.exe)
|
||||||
|
|
||||||
(deps (:lama Expressions.lama) ../runtime/runtime.a ../stdlib/x64/Fun.i)
|
(deps (:lama Expressions.lama) ../runtime/runtime.a ../stdlib/x64/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -41,6 +43,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Functions.x32.exe)
|
(targets Functions.x32.exe)
|
||||||
|
(enabled_if (<> %{ocaml-config:os_type} "Darwin"))
|
||||||
(deps (:lama Functions.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
(deps (:lama Functions.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -61,6 +64,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Functions.x64.exe)
|
(targets Functions.x64.exe)
|
||||||
|
|
||||||
(deps (:lama Functions.lama) ../runtime/runtime.a ../stdlib/x64/Fun.i)
|
(deps (:lama Functions.lama) ../runtime/runtime.a ../stdlib/x64/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -81,6 +85,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Hello.x32.exe)
|
(targets Hello.x32.exe)
|
||||||
|
(enabled_if (<> %{ocaml-config:os_type} "Darwin"))
|
||||||
(deps (:lama Hello.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
(deps (:lama Hello.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -101,6 +106,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Hello.x64.exe)
|
(targets Hello.x64.exe)
|
||||||
|
|
||||||
(deps (:lama Hello.lama) ../runtime/runtime.a ../stdlib/x64/Fun.i)
|
(deps (:lama Hello.lama) ../runtime/runtime.a ../stdlib/x64/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -121,6 +127,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets PatternMatching.x32.exe)
|
(targets PatternMatching.x32.exe)
|
||||||
|
(enabled_if (<> %{ocaml-config:os_type} "Darwin"))
|
||||||
(deps (:lama PatternMatching.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
(deps (:lama PatternMatching.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -141,6 +148,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets PatternMatching.x64.exe)
|
(targets PatternMatching.x64.exe)
|
||||||
|
|
||||||
(deps (:lama PatternMatching.lama) ../runtime/runtime.a ../stdlib/x64/Fun.i)
|
(deps (:lama PatternMatching.lama) ../runtime/runtime.a ../stdlib/x64/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -161,6 +169,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Values.x32.exe)
|
(targets Values.x32.exe)
|
||||||
|
(enabled_if (<> %{ocaml-config:os_type} "Darwin"))
|
||||||
(deps (:lama Values.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
(deps (:lama Values.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -181,6 +190,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Values.x64.exe)
|
(targets Values.x64.exe)
|
||||||
|
|
||||||
(deps (:lama Values.lama) ../runtime/runtime.a ../stdlib/x64/Fun.i)
|
(deps (:lama Values.lama) ../runtime/runtime.a ../stdlib/x64/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ let demos = ["Expressions"; "Functions"; "Hello"; "PatternMatching"; "Values"]
|
||||||
let template = {|
|
let template = {|
|
||||||
(rule
|
(rule
|
||||||
(targets %DEMO%.exe)
|
(targets %DEMO%.exe)
|
||||||
|
%COND%
|
||||||
(deps (:lama %DEMOSRC%.lama) %RUNTIME%/runtime.a %STDLIB%/Fun.i)
|
(deps (:lama %DEMOSRC%.lama) %RUNTIME%/runtime.a %STDLIB%/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -30,6 +31,7 @@ let () =
|
||||||
template
|
template
|
||||||
|> Str.global_replace (Str.regexp "%DEMO%") (demo^".x32")
|
|> Str.global_replace (Str.regexp "%DEMO%") (demo^".x32")
|
||||||
|> Str.global_replace (Str.regexp "%DEMOSRC%") demo
|
|> Str.global_replace (Str.regexp "%DEMOSRC%") demo
|
||||||
|
|> Str.global_replace (Str.regexp "%COND%") {|(enabled_if (<> %{ocaml-config:os_type} "Darwin"))|}
|
||||||
|> Str.global_replace (Str.regexp "%RUNTIME%") "../runtime32"
|
|> Str.global_replace (Str.regexp "%RUNTIME%") "../runtime32"
|
||||||
|> Str.global_replace (Str.regexp "%STDLIB%") "../stdlib/x32"
|
|> Str.global_replace (Str.regexp "%STDLIB%") "../stdlib/x32"
|
||||||
|> Str.global_replace (Str.regexp "%EXTRASWITCHES%") "-march=x86"
|
|> Str.global_replace (Str.regexp "%EXTRASWITCHES%") "-march=x86"
|
||||||
|
|
@ -37,6 +39,7 @@ let () =
|
||||||
template
|
template
|
||||||
|> Str.global_replace (Str.regexp "%DEMO%") (demo^".x64")
|
|> Str.global_replace (Str.regexp "%DEMO%") (demo^".x64")
|
||||||
|> Str.global_replace (Str.regexp "%DEMOSRC%") demo
|
|> Str.global_replace (Str.regexp "%DEMOSRC%") demo
|
||||||
|
|> Str.global_replace (Str.regexp "%COND%") ""
|
||||||
|> Str.global_replace (Str.regexp "%RUNTIME%") "../runtime"
|
|> Str.global_replace (Str.regexp "%RUNTIME%") "../runtime"
|
||||||
|> Str.global_replace (Str.regexp "%STDLIB%") "../stdlib/x64"
|
|> Str.global_replace (Str.regexp "%STDLIB%") "../stdlib/x64"
|
||||||
|> Str.global_replace (Str.regexp "%EXTRASWITCHES%") "-march=x86_64"
|
|> Str.global_replace (Str.regexp "%EXTRASWITCHES%") "-march=x86_64"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue