Commit Graph

3184 Commits

Author SHA1 Message Date
visualfc
5fe7ee9b6a internal/cabi: TestBuild TestABI 2025-08-13 15:28:04 +08:00
luoliwoshang
a069e1d438 internal/build:include target build-tags in Go package compilation 2025-08-12 18:59:49 +08:00
dependabot[bot]
827f8b0e88 build(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 08:37:24 +00:00
luoliwoshang
b9fdc2a25c fix: set correct argc=0 in _start() function 2025-08-12 15:42:44 +08:00
visualfc
d2d999d369 internal/cabi: transform cfunc check called 2025-08-12 10:54:32 +08:00
visualfc
7b36cca86b _demo/cabi: abi test demo 2025-08-12 09:46:03 +08:00
visualfc
843dd03553 cmd: llgo -abi flag (default 2) 2025-08-12 09:43:47 +08:00
visualfc
6460724feb chore: llgen -abi flags (default 0) 2025-08-12 09:42:58 +08:00
visualfc
8e87bb6e86 internal/build: cabi transformer 2025-08-12 09:31:43 +08:00
visualfc
3ac2929789 internal/cabi: transform pkg to cabi 2025-08-12 09:30:16 +08:00
visualfc
2a88d5777a ssa: export target and module 2025-08-12 09:29:43 +08:00
xushiwei
b2c6534c92 Merge pull request #1209 from goplus/dependabot/go_modules/github.com/goplus/llvm-0.8.5
build(deps): bump github.com/goplus/llvm from 0.8.3 to 0.8.5
2025-08-08 19:49:51 +08:00
xushiwei
303b620062 Merge pull request #1208 from goplus/dependabot/go_modules/golang.org/x/tools-0.36.0
build(deps): bump golang.org/x/tools from 0.35.0 to 0.36.0
2025-08-08 19:49:32 +08:00
xushiwei
6940a5846b Merge pull request #1210 from visualfc/ssa_typeassert
ssa: fix TypeAssert check null
2025-08-08 19:48:27 +08:00
xushiwei
aa165829c6 Merge pull request #1199 from visualfc/pyptr
ssa: PyVal support pointer to long
2025-08-08 19:46:43 +08:00
visualfc
56f90dbcf9 ssa: fix TypeAssert check null 2025-08-08 12:11:17 +08:00
dependabot[bot]
1e09f54e56 build(deps): bump github.com/goplus/llvm from 0.8.3 to 0.8.5
Bumps [github.com/goplus/llvm](https://github.com/goplus/llvm) from 0.8.3 to 0.8.5.
- [Release notes](https://github.com/goplus/llvm/releases)
- [Commits](https://github.com/goplus/llvm/compare/v0.8.3...v0.8.5)

---
updated-dependencies:
- dependency-name: github.com/goplus/llvm
  dependency-version: 0.8.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-08 00:51:16 +00:00
dependabot[bot]
39f0877ba0 build(deps): bump golang.org/x/tools from 0.35.0 to 0.36.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.35.0 to 0.36.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.35.0...v0.36.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-version: 0.36.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-08 00:51:11 +00:00
visualfc
54dfd3c701 ssa: PyVal support pointer to long 2025-08-07 20:39:35 +08:00
xushiwei
f43e2c0dee Merge pull request #1204 from visualfc/checklink
internal/build: set CheckLinkArgs disable on default
2025-08-07 17:17:22 +08:00
xushiwei
b03b8146df Merge pull request #1202 from visualfc/build
internal/build: delete duplicate linkObjFiles
2025-08-07 17:15:29 +08:00
xushiwei
1f94cfbe57 Merge pull request #1173 from luoliwoshang/os/direntNamePtr
os:direntNamePtr for array
2025-08-07 16:59:56 +08:00
xushiwei
6648e43bba Merge pull request #1205 from goplus/dependabot/github_actions/actions/download-artifact-5
build(deps): bump actions/download-artifact from 4 to 5
2025-08-07 16:55:46 +08:00
Li Jie
87f4f618aa feat(crosscompile): use versioned cache directory for ESP Clang
Add version suffix to ESP Clang cache directory path to enable
automatic updates when espClangVersion changes.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-06 20:25:50 +08:00
visualfc
dab8379392 internal/build: set CheckLinkArgs disable on default 2025-08-06 15:01:05 +08:00
dependabot[bot]
2fde31d782 build(deps): bump actions/download-artifact from 4 to 5
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-06 00:16:30 +00:00
Li Jie
7c4c8b8726 use prebuilt esp-llvm 2025-08-05 20:28:26 +08:00
Li Jie
deea8754ae feat(crosscompile): add ESP Clang multi-platform support
- Add ESP Clang download and extraction for cross-compilation
- Support multiple platforms: darwin/amd64, darwin/arm64, linux/amd64, linux/arm64, windows/amd64
- Integrate ESP Clang with target-based configuration system
- Add ClangRoot and ClangBinPath fields to Export struct
- Support .tar.xz extraction for ESP Clang packages
- Prioritize LLGoROOT clang installation over cached downloads
- Update build system to use custom clang for embedded platforms

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 15:18:15 +08:00
visualfc
69c1787e22 internal/build: delete duplicate linkObjFiles 2025-08-04 10:39:43 +08:00
Li Jie
3ac881b191 feat(crosscompile): add wasi-libc support with LLGoROOT priority
- Check LLGoROOT/crosscompile/wasi-libc first before downloading
- Fallback to cached wasi-sdk download if not found locally
- Update downloadAndExtract to return wasiSdkRoot path directly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-02 20:18:37 +08:00
xushiwei
aa49fe665f Merge pull request #1193 from cpunion/targets-refactor-1176
Build targets task 1: Basic Target Parameter Support for llgo build/run/test commands
2025-08-02 06:09:52 +08:00
Li Jie
b773de0815 ci: add build -target tests 2025-07-30 20:25:05 +08:00
Li Jie
49a5d3a350 dummy _start function for libc-free cases 2025-07-30 20:16:30 +08:00
Li Jie
6f829d0d43 add empty demo for build -target tests 2025-07-30 20:16:29 +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
0136344282 feat(cmd): add -target flag support for build commands
- Add Target flag variable to support -target parameter
- Update AddBuildFlags to include target platform option
- Enable syntax: -target platform (e.g., rp2040, wasi)

🤖 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
Li Jie
5424b53b62 feat(crosscompile): extend Export struct and add target-based configuration
- Add LLVMTarget, CPU, Features, BuildTags fields to Export struct
- Implement UseTarget() function for target name-based configuration loading
- Add UseWithTarget() function combining target and goos/goarch fallback
- Include comprehensive unit tests for target integration
- Support 206+ embedded platform configurations with inheritance

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 20:16:25 +08:00
xushiwei
86519b471e Merge pull request #1198 from visualfc/pybytes
ssa: PyVal support py bytes
2025-07-30 15:18:22 +08:00
visualfc
36fa18b28c ssa: PyVal support py bytes 2025-07-30 12:12:19 +08:00
xushiwei
d8da4364fd Merge pull request #1196 from visualfc/pyfunc
ssa: PyVal support pyfunc
2025-07-29 21:42:17 +08:00
visualfc
2538be9318 ssa: PyVal support pyfunc 2025-07-29 20:55:56 +08:00
xushiwei
a9193e36ff Merge pull request #1195 from visualfc/pyexpr
ssa: PyVal support bool,int,uint,string,complex
2025-07-29 20:09:16 +08:00
visualfc
0a6588c348 ssa: PyVal support bool,int,uint,string,bytearray,complex 2025-07-29 16:08:09 +08:00
Li Jie
0c11c93b3a docs: add LICENSE file for targets directory
Add license attribution for target configuration files derived from TinyGo project:

- Document source from https://github.com/tinygo-org/tinygo/tree/release/targets
- Include complete BSD 3-Clause license from TinyGo project
- Clarify licensing terms for target configuration files
- Ensure proper attribution to TinyGo Authors and Go Authors
- Maintain compliance with original license requirements

This ensures proper license compliance when using TinyGo's target configurations
in the llgo project.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 15:13:02 +08:00
Li Jie
b80a54eb0f feat: implement target configuration system for issue #1176
Add comprehensive target configuration parsing and inheritance system:

- Create internal/targets package with config structures
- Support JSON configuration loading with inheritance resolution
- Implement multi-level inheritance (e.g., rp2040 → cortex-m0plus → cortex-m)
- Add 206 target configurations from TinyGo for embedded platforms
- Support core fields: name, llvm-target, cpu, features, build-tags, goos, goarch, cflags, ldflags
- Provide high-level resolver interface for target lookup
- Include comprehensive unit tests with 100% target parsing coverage

This foundation enables future -target parameter support for cross-compilation
to diverse embedded platforms beyond current GOOS/GOARCH limitations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 15:12:58 +08:00
xushiwei
5eb833a984 Update README.md 2025-07-15 12:30:41 +08:00
xushiwei
66fd3a552d Merge pull request #1186 from goplus/dependabot/go_modules/golang.org/x/tools-0.35.0
build(deps): bump golang.org/x/tools from 0.34.0 to 0.35.0
2025-07-14 23:19:16 +08:00
dependabot[bot]
7f4b0d6215 build(deps): bump golang.org/x/tools from 0.34.0 to 0.35.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.34.0 to 0.35.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.34.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-version: 0.35.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-14 01:07:12 +00:00
xushiwei
5e6dd7644b Update README.md 2025-07-08 16:09:22 +08:00