Skip to content

Commit c07a075

Browse files
authored
Merge pull request #44 from TsurHerman/master
precompile and compilecache turned off
2 parents 6f6740e + c7225ad commit c07a075

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/snooping.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ function snoop(path, compilationfile, csv)
3232
delims = r"([\{\} \n\(\),])_([\{\} \n\(\),])"
3333
tmp_mod = eval(:(module $(gensym()) end))
3434
open(compilationfile, "w") do io
35+
println(io, "Sys.__init__()")
36+
println(io, "Base.early_init()")
3537
for (k, v) in pc
3638
k == :unknown && continue
3739
try
38-
eval(tmp_mod, :(using $k))
39-
println(io, "using $k")
40-
info("using $k")
40+
eval(tmp_mod, :(import $k))
41+
println(io, "import $k")
42+
info("import $k")
4143
catch e
4244
warn("Module not found: $k")
4345
end

src/static_julia.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ else
1515
end
1616

1717
system_compiler() = gcc
18-
bitness_flag() = Int == Int32 ? "-m32" : "-m64"
18+
bitness_flag() = Sys.ARCH == :aarch64 ? `` : Int == Int32 ? "-m32" : "-m64"
1919
executable_ext() = (iswindows() ? ".exe" : "")
2020

2121
function mingw_dir(folders...)
@@ -171,15 +171,15 @@ function build_julia_cmd(
171171
sysimage == nothing || (julia_cmd.exec[3] = "-J$sysimage")
172172
push!(julia_cmd.exec, string("--startup-file=", startupfile ? "yes" : "no"))
173173
compile == nothing || (julia_cmd.exec[4] = "--compile=$compile")
174-
cpu_target == nothing || (julia_cmd.exec[2] = "-C$cpu_target";
175-
push!(julia_cmd.exec, "--precompiled=no");
176-
push!(julia_cmd.exec, "--compilecache=no"))
174+
cpu_target == nothing || (julia_cmd.exec[2] = "-C$cpu_target";)
177175
optimize == nothing || push!(julia_cmd.exec, "-O$optimize")
178176
debug == nothing || push!(julia_cmd.exec, "-g$debug")
179177
inline == nothing || push!(julia_cmd.exec, "--inline=$inline")
180178
check_bounds == nothing || push!(julia_cmd.exec, "--check-bounds=$check_bounds")
181179
math_mode == nothing || push!(julia_cmd.exec, "--math-mode=$math_mode")
182180
depwarn == nothing || (julia_cmd.exec[5] = "--depwarn=$depwarn")
181+
push!(julia_cmd.exec, "--precompiled=no");
182+
push!(julia_cmd.exec, "--compilecache=no")
183183
julia_cmd
184184
end
185185

0 commit comments

Comments
 (0)