diff options
author | Rubén Rincón Blanco <ruben@rinconblanco.es> | 2021-06-25 15:52:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-25 15:52:05 +0200 |
commit | 0fca6c8c0be98a36bdb3ed840d69e4ea69da6e37 (patch) | |
tree | d18201dc13c4378663cba7389dad56e3b4601f1a /lib/compilers/zig.js | |
parent | 3fe2a217d10c06b67a56ff9cc6b1b24619e87def (diff) | |
download | compiler-explorer-0fca6c8c0be98a36bdb3ed840d69e4ea69da6e37.tar.gz compiler-explorer-0fca6c8c0be98a36bdb3ed840d69e4ea69da6e37.zip |
Adds Zig-args (#2735)
* Adds Zig-args
This is the first Zig library added to the site, so this implementation
might be broken in unexpected ways
See issue #2525
* Update lib/base-compiler.js
Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>
Co-authored-by: Matt Godbolt <matt@godbolt.org>
Diffstat (limited to 'lib/compilers/zig.js')
-rw-r--r-- | lib/compilers/zig.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/compilers/zig.js b/lib/compilers/zig.js index db1570d88..a93e7b18f 100644 --- a/lib/compilers/zig.js +++ b/lib/compilers/zig.js @@ -122,6 +122,15 @@ export class ZigCompiler extends BaseCompiler { return options; } + getIncludeArguments(libraries) { + return _.flatten(_.map(libraries, (selectedLib) => { + const foundVersion = this.findLibVersion(selectedLib); + if (!foundVersion) return false; + // Zig should not have more than 1 path + return ['--pkg-begin', foundVersion.name, foundVersion.path, '--pkg-end']; + })); + } + getIrOutputFilename(inputFilename) { return this.getOutputFilename(path.dirname(inputFilename), this.outputFilebase) .replace('.s', '.ll'); |