Skip to content

Commit b19452a

Browse files
committed
try to fix win32
1 parent 4a6fee9 commit b19452a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/juliac.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ function julia_compile(
174174
flags = `$cflags $ldflags $ldlibs`
175175
end
176176
end
177-
177+
bitness = Int == Int32 ? "-m32" : "-m64"
178178
if shared
179-
command = `$cc -m64 -shared -o $s_file $(joinpath(tmp_dir, o_file)) $flags`
179+
command = `$cc $bitness -shared -o $s_file $(joinpath(tmp_dir, o_file)) $flags`
180180
if julia_v07
181181
if Sys.isapple()
182182
command = `$command -Wl,-install_name,@rpath/\"$s_file\"`
@@ -195,7 +195,7 @@ function julia_compile(
195195
end
196196
197197
if executable
198-
command = `$cc -m64 -DJULIAC_PROGRAM_LIBNAME=\"$s_file\" -o $e_file $cprog $s_file $flags`
198+
command = `$cc $bitness -DJULIAC_PROGRAM_LIBNAME=\"$s_file\" -o $e_file $cprog $s_file $flags`
199199
if julia_v07
200200
if Sys.isapple()
201201
command = `$command -Wl,-rpath,@executable_path`

0 commit comments

Comments
 (0)