forked from alpertron/calculators
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile2
54 lines (49 loc) · 4.65 KB
/
compile2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
cp ../calc/*.c .
cp ../calc/*.h .
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -DFACTORIZATION_FUNCTIONS=1 -c -Oz expression.c -o expression.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz partition.c -o partition.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz errors.c -o errors.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz bigint.c -o bigint.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz division.c -o division.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz baseconv.c -o baseconv.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz karatsuba.c -o karatsuba.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz modmult.c -o modmult.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz sqroot.c -o sqroot.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -DFACTORIZATION_APP=1 -c -Oz factor.c -o factor.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz siqs.c -o siqs.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -DFACTORIZATION_APP=1 -c -Oz ecmfront.c -o ecmfront.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz bignbr.c -o bignbr.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz showtime.c -o showtime.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz from_musl.c -o from_musl.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz inputstr.c -o inputstr.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz batch.c -o batch.bc
/usr/local/bin/llvm-link expression.bc partition.bc errors.bc bigint.bc division.bc baseconv.bc karatsuba.bc modmult.bc sqroot.bc factor.bc siqs.bc ecmfront.bc bignbr.bc showtime.bc from_musl.bc inputstr.bc batch.bc -o ecm1.bc
/usr/local/bin/opt -internalize -internalize-public-api-list=getFactorsAsciiPtr,getInputStringPtr,doWork,memory ecm1.bc -o ecm.bc
/usr/local/bin/llc -O3 ecm.bc -march=wasm32 -o ecm.s
../binaryen/build/bin/s2wasm ecm.s -s 1000000 > ecm.wast
../wabt/build/wat2wasm -o ecm.wasm ecm.wast
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -DFACTORIZATION_APP=1 -c -Oz quad.c -o quad.bc
/usr/local/bin/llvm-link expression.bc partition.bc errors.bc bigint.bc division.bc baseconv.bc karatsuba.bc modmult.bc sqroot.bc factor.bc siqs.bc quad.bc bignbr.bc showtime.bc from_musl.bc inputstr.bc batch.bc -o quad1.bc
/usr/local/bin/opt -internalize -internalize-public-api-list=getFactorsAsciiPtr,getInputStringPtr,doWork,memory quad1.bc -o quad.bc
/usr/local/bin/llc -O3 quad.bc -march=wasm32 -o quad.s
../binaryen/build/bin/s2wasm quad.s -s 1000000 > quad.wast
../wabt/build/wat2wasm -o quad.wasm quad.wast
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz expression.c -o expression.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -DFSQUARES_APP=1 -c -Oz fsquares.c -o fsquares.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz fcubes.c -o fcubes.bc
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz contfrac.c -o contfrac.bc
/usr/local/bin/llvm-link expression.bc partition.bc errors.bc bigint.bc division.bc baseconv.bc karatsuba.bc modmult.bc sqroot.bc fsquares.bc fcubes.bc contfrac.bc bignbr.bc showtime.bc from_musl.bc inputstr.bc batch.bc -o fsquares1.bc
/usr/local/bin/opt -internalize -internalize-public-api-list=getFactorsAsciiPtr,getInputStringPtr,doWork,memory fsquares1.bc -o fsquares.bc
/usr/local/bin/llc -O3 fsquares.bc -march=wasm32 -o fsquares.s
../binaryen/build/bin/s2wasm fsquares.s -s 1000000 > fsquares.wast
../wabt/build/wat2wasm -o fsquares.wasm fsquares.wast
/usr/local/bin/clang -emit-llvm --target=wasm32 -D__EMSCRIPTEN__ -D_USING64BITS_ -c -Oz ulam.c -o ulam.bc
/usr/local/bin/llvm-link ulam.bc -o ulam1.bc
/usr/local/bin/opt -internalize -internalize-public-api-list=nbrChanged,drawPartialUlamSpiral,ShowInformation,moveSpiral,memory ulam1.bc -o ulam.bc
/usr/local/bin/llc -O3 ulam.bc -march=wasm32 -o ulam.s
../binaryen/build/bin/s2wasm ulam.s -s 1000000 > ulam.wast
../wabt/build/wat2wasm -o ulam.wasm ulam.wast
cp ecm.wasm ../calc
cp fsquares.wasm ../calc
cp ulam.wasm ../calc
cp quad.wasm ../calc