aboutsummaryrefslogtreecommitdiffhomepage
path: root/main_test.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2018-10-24 23:53:44 +0200
committerAyke van Laethem <[email protected]>2018-10-24 23:53:44 +0200
commit980dceb1925e3608a200185d2d2ee8dde52167de (patch)
tree39e2c50c1dd7d6f8d8f4db6ee9ba3e04b02e5ee4 /main_test.go
parentfcd44c02cdd74a09fb005b389c5e20b546bf5bf4 (diff)
downloadtinygo-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.go9
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()