mirror of
https://github.com/arnaucube/circom.git
synced 2026-02-07 03:06:42 +01:00
Compare commits
1 Commits
v0.5.5
...
feature/c-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b107a11432 |
@@ -42,11 +42,14 @@ async function c_tester(circomFile, _options) {
|
|||||||
await fs.promises.writeFile(path.join(dir.path, "fr.h"), source.h, "utf8");
|
await fs.promises.writeFile(path.join(dir.path, "fr.h"), source.h, "utf8");
|
||||||
await fs.promises.writeFile(path.join(dir.path, "fr.c"), source.c, "utf8");
|
await fs.promises.writeFile(path.join(dir.path, "fr.c"), source.c, "utf8");
|
||||||
|
|
||||||
|
let pThread = "";
|
||||||
|
|
||||||
if (process.platform === "darwin") {
|
if (process.platform === "darwin") {
|
||||||
await exec("nasm -fmacho64 --prefix _ " +
|
await exec("nasm -fmacho64 --prefix _ " +
|
||||||
` ${path.join(dir.path, "fr.asm")}`
|
` ${path.join(dir.path, "fr.asm")}`
|
||||||
);
|
);
|
||||||
} else if (process.platform === "linux") {
|
} else if (process.platform === "linux") {
|
||||||
|
pThread = "-pthread";
|
||||||
await exec("nasm -felf64 " +
|
await exec("nasm -felf64 " +
|
||||||
` ${path.join(dir.path, "fr.asm")}`
|
` ${path.join(dir.path, "fr.asm")}`
|
||||||
);
|
);
|
||||||
@@ -54,7 +57,7 @@ async function c_tester(circomFile, _options) {
|
|||||||
|
|
||||||
const cdir = path.join(path.dirname(require.resolve("circom_runtime")), "c");
|
const cdir = path.join(path.dirname(require.resolve("circom_runtime")), "c");
|
||||||
|
|
||||||
await exec("g++" +
|
await exec("g++" + ` ${pThread}`
|
||||||
` ${path.join(cdir, "main.cpp")}` +
|
` ${path.join(cdir, "main.cpp")}` +
|
||||||
` ${path.join(cdir, "calcwit.cpp")}` +
|
` ${path.join(cdir, "calcwit.cpp")}` +
|
||||||
` ${path.join(cdir, "utils.cpp")}` +
|
` ${path.join(cdir, "utils.cpp")}` +
|
||||||
|
|||||||
Reference in New Issue
Block a user