mason.child: Use nmake instead of calling build.cmd
build.cmd takes about 15 minutes instead of 45 seconds on the Windows mason machine. I'm not sure why, but running it from a cmd script takes a lot longer.factor-shell
parent
c95a565619
commit
37163a96d6
|
@ -3,31 +3,24 @@
|
||||||
USING: accessors arrays calendar combinators
|
USING: accessors arrays calendar combinators
|
||||||
combinators.short-circuit continuations fry io.directories
|
combinators.short-circuit continuations fry io.directories
|
||||||
io.launcher io.pathnames kernel macros make mason.config
|
io.launcher io.pathnames kernel macros make mason.config
|
||||||
mason.notify mason.platform mason.report namespaces quotations
|
mason.notify mason.platform mason.report math.parser namespaces
|
||||||
sequences splitting system ;
|
quotations sequences splitting system system-info ;
|
||||||
IN: mason.child
|
IN: mason.child
|
||||||
|
|
||||||
! Make sure we call the build directory's factor.cmd
|
HOOK: compile-factor-command os ( -- array )
|
||||||
: nmake-cmd ( -- args )
|
M: unix compile-factor-command ( -- array )
|
||||||
"./build.cmd" absolute-path
|
{ "make" "-j" } cpus number>string suffix ;
|
||||||
"latest"
|
M: windows compile-factor-command ( -- array )
|
||||||
target-cpu get name>> "." split "-" join 3array ;
|
{ "nmake" "/f" "NMakefile" "x86-64" } ;
|
||||||
|
|
||||||
: gnu-make-cmd ( -- args )
|
HOOK: factor-path os ( -- path )
|
||||||
gnu-make
|
M: unix factor-path "./factor" ;
|
||||||
target-os get name>> target-cpu get name>> (platform)
|
M: windows factor-path "./factor.com" ;
|
||||||
2array ;
|
|
||||||
|
|
||||||
: mason-child-make-cmd ( -- args )
|
|
||||||
{
|
|
||||||
{ [ target-os get windows = ] [ nmake-cmd ] }
|
|
||||||
[ gnu-make-cmd ]
|
|
||||||
} cond ;
|
|
||||||
|
|
||||||
: make-mason-child-vm ( -- )
|
: make-mason-child-vm ( -- )
|
||||||
"factor" [
|
"factor" [
|
||||||
<process>
|
<process>
|
||||||
mason-child-make-cmd >>command
|
compile-factor-command >>command
|
||||||
"../compile-log" >>stdout
|
"../compile-log" >>stdout
|
||||||
+stdout+ >>stderr
|
+stdout+ >>stderr
|
||||||
+new-group+ >>group
|
+new-group+ >>group
|
||||||
|
|
Loading…
Reference in New Issue