 403d93560b
			
		
	
	
		403d93560b
		
	
	
	
	
		
			
			This commit adds support for musl-libc and uses it by default on Linux.
The main benefit of it is that binaries are always statically linked
instead of depending on the host libc, even when using CGo.
Advantages:
  - The resulting binaries are always statically linked.
  - No need for any tools on the host OS, like a compiler, linker, or
    libc in a release build of TinyGo.
  - This also simplifies cross compilation as no cross compiler is
    needed (it's all built into the TinyGo release build).
Disadvantages:
  - Binary size increases by 5-6 kilobytes if -no-debug is used. Binary
    size increases by a much larger margin when debugging symbols are
    included (the default behavior) because musl is built with debugging
    symbols enabled.
  - Musl does things a bit differently than glibc, and some CGo code
    might rely on the glibc behavior.
  - The first build takes a bit longer because musl needs to be built.
As an additional bonus, time is now obtained from the system in a way
that fixes the Y2038 problem because musl has been a bit more agressive
in switching to 64-bit time_t.
		
	
			
		
			
				
	
	
		
			28 строки
		
	
	
	
		
			870 Б
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			28 строки
		
	
	
	
		
			870 Б
		
	
	
	
		
			Text
		
	
	
	
	
	
| [submodule "lib/nrfx"]
 | |
| 	path = lib/nrfx
 | |
| 	url = https://github.com/NordicSemiconductor/nrfx.git
 | |
| [submodule "lib/CMSIS"]
 | |
| 	path = lib/CMSIS
 | |
| 	url = https://github.com/ARM-software/CMSIS.git
 | |
| [submodule "lib/avr"]
 | |
| 	path = lib/avr
 | |
| 	url = https://github.com/avr-rust/avr-mcu.git
 | |
| [submodule "lib/cmsis-svd"]
 | |
| 	path = lib/cmsis-svd
 | |
| 	url = https://github.com/tinygo-org/cmsis-svd
 | |
| [submodule "lib/compiler-rt"]
 | |
| 	path = lib/compiler-rt
 | |
| 	url = https://github.com/llvm-mirror/compiler-rt.git
 | |
| 	branch = release_80
 | |
| [submodule "lib/wasi-libc"]
 | |
| 	path = lib/wasi-libc
 | |
| 	url = https://github.com/CraneStation/wasi-libc
 | |
| [submodule "lib/picolibc"]
 | |
| 	path = lib/picolibc
 | |
| 	url = https://github.com/keith-packard/picolibc.git
 | |
| [submodule "lib/stm32-svd"]
 | |
| 	path = lib/stm32-svd
 | |
| 	url = https://github.com/tinygo-org/stm32-svd
 | |
| [submodule "lib/musl"]
 | |
| 	path = lib/musl
 | |
| 	url = git://git.musl-libc.org/musl
 |