mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 18:53:29 +00:00
builder: add -mcpu flag while building libraries
This flag is important for the Xtensa backend because by default a more powerful backend (ESP32) is assumed. Therefore, compiling for the ESP8266 won't work by default and needs the -mcpu flag.
This commit is contained in:
committed by
Ron Evans
parent
74fe213b15
commit
8a54615a09
+2
-2
@@ -171,7 +171,7 @@ func Build(pkgName, outpath string, config *compileopts.Config, action func(Buil
|
||||
// Add compiler-rt dependency if needed. Usually this is a simple load from
|
||||
// a cache.
|
||||
if config.Target.RTLib == "compiler-rt" {
|
||||
path, job, err := CompilerRT.load(config.Triple(), dir)
|
||||
path, job, err := CompilerRT.load(config.Triple(), config.CPU(), dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -187,7 +187,7 @@ func Build(pkgName, outpath string, config *compileopts.Config, action func(Buil
|
||||
|
||||
// Add libc dependency if needed.
|
||||
if config.Target.Libc == "picolibc" {
|
||||
path, job, err := Picolibc.load(config.Triple(), dir)
|
||||
path, job, err := Picolibc.load(config.Triple(), config.CPU(), dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user