diff options
author | Patrick Quist <partouf@gmail.com> | 2020-09-04 20:19:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 20:19:10 +0200 |
commit | baa37fadb4b0892b0f3e955bd16e80289c795f5d (patch) | |
tree | c628adb034339fd485ff25f086908e660323bdeb /lib/compilers/golang.js | |
parent | 6b6a9ef36420e45d003239aae181ca2433b49f20 (diff) | |
download | compiler-explorer-baa37fadb4b0892b0f3e955bd16e80289c795f5d.tar.gz compiler-explorer-baa37fadb4b0892b0f3e955bd16e80289c795f5d.zip |
[WIP] Golang GO support binary + execution (#2179)
* glgo support binary + execution
* fix args
* disable binary for 1.4.1
Diffstat (limited to 'lib/compilers/golang.js')
-rw-r--r-- | lib/compilers/golang.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/compilers/golang.js b/lib/compilers/golang.js index 2f7bc85b7..2426fceb2 100644 --- a/lib/compilers/golang.js +++ b/lib/compilers/golang.js @@ -183,13 +183,22 @@ class GolangCompiler extends BaseCompiler { return [result, '']; } + getSharedLibraryPathsAsArguments() { + return []; + } + optionsForFilter(filters, outputFilename, userOptions) { // If we're dealing with an older version... if (this.compiler.id === '6g141') { return ['tool', '6g', '-g', '-o', outputFilename, '-S']; } - // Add userOptions to -gcflags to preserve previous behavior. - return ['build', '-o', outputFilename, '-gcflags', '-S ' + userOptions.join(' ')]; + + if (filters.binary) { + return ['build', '-o', outputFilename, '-gcflags=' + userOptions.join(' ')]; + } else { + // Add userOptions to -gcflags to preserve previous behavior. + return ['build', '-o', outputFilename, '-gcflags', '-S ' + userOptions.join(' ')]; + } } filterUserOptions(userOptions) { |