Commit Graph

186 Commits

Author SHA1 Message Date
Li Jie
49a5d3a350 dummy _start function for libc-free cases 2025-07-30 20:16:30 +08:00
Li Jie
daf0d7e56e feat(cmd): enable -target parameter for build, run, and test commands
- Update build command: llgo build -target platform
- Update run command: llgo run -target platform
- Update test command: llgo test -target platform
- Wire target flag to build configuration
- Update usage documentation for new parameter

Examples:
- llgo build -target rp2040 ./firmware
- llgo run -target wasi ./main.go
- llgo test -target cortex-m ./tests

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 20:16:29 +08:00
Li Jie
f571dde538 feat(build): integrate target configuration system into build pipeline
- Add Target field to build.Config struct
- Update build system to use crosscompile.UseWithTarget()
- Enable target-based cross-compilation in build pipeline
- Maintain backward compatibility with existing GOOS/GOARCH workflow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 20:16:29 +08:00
luoliwoshang
e60c3bd943 refactor(internal/build):remove rpath change 2025-06-26 13:55:58 +08:00
visualfc
249f85a25e build: gen pkg to object 2025-06-25 21:01:18 +08:00
luoliwoshang
b469fc990f fix(build):test all pkg with llgo test ./... 2025-06-24 14:07:20 +08:00
xushiwei
915cdf2c23 #1165 2025-06-23 22:01:42 +08:00
xushiwei
e9c96390e6 Merge pull request #1151 from luoliwoshang/internal/build/testdir
internal/build:switch workdir from testpkg like go behavior
2025-06-22 15:26:07 +08:00
visualfc
4726e824a0 build: link globals importpath.name=value 2025-06-17 11:11:06 +08:00
luoliwoshang
48bd1d46af internal/build:switch workdir from testpkg like go behavior 2025-06-12 16:49:40 +08:00
luoliwoshang
93197e7621 internal/build:compile with c mode,when c file 2025-06-12 11:55:47 +08:00
luoliwoshang
4f5c95045d chore:keep origin c format 2025-06-11 20:30:44 +08:00
luoliwoshang
f2f93c7f5f cl:compile with clang++ 2025-06-11 17:01:12 +08:00
luoliwoshang
780c927ea6 chore:test exit code. 2025-05-22 09:53:34 +08:00
luoliwoshang
0463230533 build:exit when test fail 2025-05-21 16:21:06 +08:00
Li Jie
fd1def7885 build js/wasm target with emscripten 2025-05-17 10:48:27 +08:00
Li Jie
489a0069aa extract common cmd flags 2025-04-18 13:12:05 +08:00
Li Jie
29ec4a7a0e allow config LLGO_WASM_RUNTIME with args 2025-04-17 09:58:52 +08:00
Li Jie
8b26c48d9b execute clang -v in verbose mode 2025-04-17 09:58:52 +08:00
Li Jie
ddd0535d30 split llfiles and ldflags and extract compileAndLinkLLFiles to prepare multi-phase build 2025-04-17 09:58:52 +08:00
Li Jie
3110382d88 fix abi methods crash on wasm 2025-04-11 17:16:02 +08:00
Li Jie
9ee55896e3 update link args for wasm target 2025-04-11 16:28:48 +08:00
Li Jie
ad6f41f312 add LLGO_STDIO_NOBUF to toggle stdout/stderr buffer 2025-04-11 16:28:48 +08:00
Li Jie
0ef683bba9 add LLGO_WASI_THREADS to toggle wasi threads support 2025-04-11 16:28:47 +08:00
Li Jie
be4737461a make runtime compatible with wasm 2025-04-11 16:28:44 +08:00
Li Jie
d1dce65313 update link flags 2025-04-09 14:57:33 +08:00
Li Jie
641f9bbf7c select WASM runtime by LLGO_WASM_RUNTIME 2025-04-09 14:57:32 +08:00
Li Jie
f35063ee6e build: download and compile with wasi-sdk 2025-04-08 11:12:57 +08:00
Li Jie
e6c7627ee8 cross compilation 2025-04-08 10:46:14 +08:00
Li Jie
ed366568b4 move out c/cpp/py 2025-04-03 16:26:11 +08:00
Li Jie
1172e5bdce build: separate compiler and libs 2025-01-08 14:59:01 +08:00
Li Jie
b3f4716616 runtime: patch internal/filepathlite 2025-01-08 14:58:59 +08:00
Li Jie
03b469212e feat: upgrade to x/tools 0.28 2025-01-08 14:58:59 +08:00
xushiwei
9e9e8e82b2 Merge pull request #936 from cpunion/optional-llgo-root
build: make llgo root usage optional for runtime loading
2025-01-07 19:47:40 +08:00
Li Jie
7093ced2d8 build: make llgo root usage optional for runtime loading
When github.com/goplus/llgo is imported in go.mod, use the user-specified
version instead of LLGoROOT. This allows users to upgrade llgo via go.mod
while maintaining backward compatibility for cases without explicit imports.

Note: This is a temporary solution. The runtime's dependency on
github.com/goplus/llgo/c/* needs to be addressed in future improvements.
2025-01-06 16:36:16 +08:00
Li Jie
179f4dfe22 build: ParseArgs return new slices 2025-01-06 10:10:11 +08:00
Li Jie
290f99b4d1 env: allow compiling code outside llgo directory 2025-01-04 23:40:13 +08:00
tsingbx
af2bcd389e fix link error 2024-12-08 10:18:47 +08:00
visualfc
0b3ce5f65a build: env LLGO_CHECK=1 for llc check module 2024-12-05 11:07:21 +08:00
Li Jie
90763de93c cgo: supports c/go callback funcs 2024-11-27 18:41:56 +08:00
Li Jie
43c4a3bfdc test: enable debug testing 2024-11-26 15:43:34 +08:00
Li Jie
d879d0d924 build: make llgen, cltest, gentests call build.Do 2024-11-26 13:17:36 +08:00
Li Jie
9cec486a1b build: compatible spaces in path outputted from pkg-config 2024-11-19 16:43:45 +08:00
Li Jie
8e5fff6c5f build: fix linking args and llgo install 2024-11-19 10:50:45 +08:00
Li Jie
9f0b3963cb cgo: support full cgo tags 2024-11-15 16:08:24 +08:00
Li Jie
a64f4219e9 cgo: full supports cgo preambles and auto compile c files 2024-11-14 23:44:25 +08:00
Li Jie
be08bcaafc debug: compile to dwarf-4 2024-09-30 15:22:38 +08:00
Li Jie
6c18dc63aa build: enable ssa.GlobalDebug when LLGO_DEBUG=1 enabled, enable ssa.NaiveForm when LLGO_OPTIMIZED=0 2024-09-24 14:16:49 +08:00
Li Jie
dad22b1686 cl: switch debug symbols with LLGO_DEBUG 2024-09-22 11:52:23 +08:00
Li Jie
7ddc8c6aeb increase coverage rate 2024-09-18 21:14:04 +08:00