mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-24 06:19:04 +00:00
main: link with --gc-sections
This may help reduce code size in some cases.
This commit is contained in:
committed by
Ron Evans
parent
013a71aa3d
commit
0757eb5919
@@ -211,7 +211,7 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) {
|
|||||||
BuildTags: []string{goos, goarch},
|
BuildTags: []string{goos, goarch},
|
||||||
Compiler: commands["clang"],
|
Compiler: commands["clang"],
|
||||||
Linker: "cc",
|
Linker: "cc",
|
||||||
LDFlags: []string{"-no-pie"}, // WARNING: clang < 5.0 requires -nopie
|
LDFlags: []string{"-no-pie", "-Wl,--gc-sections"}, // WARNING: clang < 5.0 requires -nopie
|
||||||
Objcopy: "objcopy",
|
Objcopy: "objcopy",
|
||||||
GDB: "gdb",
|
GDB: "gdb",
|
||||||
GDBCmds: []string{"run"},
|
GDBCmds: []string{"run"},
|
||||||
|
|||||||
Reference in New Issue
Block a user