diff options
author | Ayke van Laethem <[email protected]> | 2018-10-24 23:53:44 +0200 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2018-10-24 23:53:44 +0200 |
commit | 980dceb1925e3608a200185d2d2ee8dde52167de (patch) | |
tree | 39e2c50c1dd7d6f8d8f4db6ee9ba3e04b02e5ee4 /main_test.go | |
parent | fcd44c02cdd74a09fb005b389c5e20b546bf5bf4 (diff) | |
download | tinygo-980dceb1925e3608a200185d2d2ee8dde52167de.tar.gz tinygo-980dceb1925e3608a200185d2d2ee8dde52167de.zip |
main: refactor build option passing
The list of options passed to build/run/gdb/etc commands was getting
unwieldly and hard to add extra options to. Put all common build options
in a single build config struct so that these options are more
centralized.
Diffstat (limited to 'main_test.go')
-rw-r--r-- | main_test.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/main_test.go b/main_test.go index 4d7e62f86..afebb9a87 100644 --- a/main_test.go +++ b/main_test.go @@ -59,8 +59,15 @@ func runTest(path, tmpdir string, target string, t *testing.T) { } // Build the test binary. + config := &BuildConfig{ + opt: "z", + printIR: false, + dumpSSA: false, + debug: false, + printSizes: "", + } binary := filepath.Join(tmpdir, "test") - err = Build(path, binary, target, "z", false, false, false, "") + err = Build(path, binary, target, config) if err != nil { t.Log("failed to build:", err) t.Fail() |