Skip to content

Commit 28cc6cf

Browse files
committed
Feature(ssc): Use runtime as dep
1 parent cdd2eb0 commit 28cc6cf

7 files changed

Lines changed: 32 additions & 6 deletions

File tree

.npmignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
src
22
runtime-1
33
runtime-test
4-
packages/hello-world
5-
packages/definition
4+
packages
65
node_modules
76
.idea
87
hello_world.*

package-lock.json

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"commander": "^2.19.0"
2424
},
2525
"dependencies": {
26+
"@static-script/runtime": "^0.1.0",
2627
"llvm-node": "github:MichaReiser/llvm-node#master",
2728
"typescript": "^3.1.1"
2829
}
920 Bytes
Binary file not shown.

packages/hello-world/output/main.o

472 Bytes
Binary file not shown.

packages/runtime/package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as ts from 'typescript';
33
import * as path from 'path';
44
import * as llvm from 'llvm-node';
55
import * as cli from "commander";
6+
import {RUNTIME_ARCHIVE_FILE} from "@static-script/runtime";
67

78
import {initializeLLVM, generateModuleFromProgram} from './backend/llvm';
89
import DiagnosticHostInstance from "./diagnostic.host";
@@ -79,7 +80,7 @@ try {
7980
execFileSync("cc", [
8081
optimizationLevel,
8182
path.join(outputPath, 'main.o'),
82-
path.join(path.dirname(__filename), '..', 'packages', 'runtime', 'libhlvm-runtime.a'),
83+
RUNTIME_ARCHIVE_FILE,
8384
'-o', path.join(outputPath, 'main'),
8485
'-lstdc++',
8586
'-std=c++11',

0 commit comments

Comments
 (0)