@@ -247,10 +247,9 @@ func MuslArchitecture(triple string) string {
247247 return CanonicalArchName (triple )
248248}
249249
250- // LibcPath returns the path to the libc directory. The libc path will be either
251- // a precompiled libc shipped with a TinyGo build, or a libc path in the cache
252- // directory (which might not yet be built).
253- func (c * Config ) LibcPath (name string ) (path string , precompiled bool ) {
250+ // LibcPath returns the path to the libc directory. The libc path will be a libc
251+ // path in the cache directory (which might not yet be built).
252+ func (c * Config ) LibcPath (name string ) string {
254253 archname := c .Triple ()
255254 if c .CPU () != "" {
256255 archname += "-" + c .CPU ()
@@ -266,17 +265,9 @@ func (c *Config) LibcPath(name string) (path string, precompiled bool) {
266265 archname += "-" + c .Target .Libc
267266 }
268267
269- // Try to load a precompiled library.
270- precompiledDir := filepath .Join (goenv .Get ("TINYGOROOT" ), "pkg" , archname , name )
271- if _ , err := os .Stat (precompiledDir ); err == nil {
272- // Found a precompiled library for this OS/architecture. Return the path
273- // directly.
274- return precompiledDir , true
275- }
276-
277268 // No precompiled library found. Determine the path name that will be used
278269 // in the build cache.
279- return filepath .Join (goenv .Get ("GOCACHE" ), name + "-" + archname ), false
270+ return filepath .Join (goenv .Get ("GOCACHE" ), name + "-" + archname )
280271}
281272
282273// DefaultBinaryExtension returns the default extension for binaries, such as
@@ -360,7 +351,7 @@ func (c *Config) LibcCFlags() []string {
360351 case "picolibc" :
361352 root := goenv .Get ("TINYGOROOT" )
362353 picolibcDir := filepath .Join (root , "lib" , "picolibc" , "newlib" , "libc" )
363- path , _ := c .LibcPath ("picolibc" )
354+ path := c .LibcPath ("picolibc" )
364355 return []string {
365356 "-nostdlibinc" ,
366357 "-isystem" , filepath .Join (path , "include" ),
@@ -370,7 +361,7 @@ func (c *Config) LibcCFlags() []string {
370361 }
371362 case "musl" :
372363 root := goenv .Get ("TINYGOROOT" )
373- path , _ := c .LibcPath ("musl" )
364+ path := c .LibcPath ("musl" )
374365 arch := MuslArchitecture (c .Triple ())
375366 return []string {
376367 "-nostdlibinc" ,
@@ -390,7 +381,7 @@ func (c *Config) LibcCFlags() []string {
390381 return nil
391382 case "mingw-w64" :
392383 root := goenv .Get ("TINYGOROOT" )
393- path , _ := c .LibcPath ("mingw-w64" )
384+ path := c .LibcPath ("mingw-w64" )
394385 return []string {
395386 "-nostdlibinc" ,
396387 "-isystem" , filepath .Join (path , "include" ),
0 commit comments