Commit Graph

3184 Commits

Author SHA1 Message Date
Li Jie
c3b674d804 add export demo and test 2025-09-11 14:08:52 +08:00
Li Jie
3605eeeef7 export c header file for build library 2025-09-11 14:07:58 +08:00
Li Jie
729e5772a0 process //export with initLink 2025-09-11 08:53:17 +08:00
Li Jie
a2742a9de4 set buildmode to exe for non-build mode 2025-09-11 08:53:17 +08:00
Li Jie
68947bfc1f Fix library mode linking by optimizing genMainModuleFile
- For library modes (c-archive, c-shared), only generate minimal code with __llgo_argc/__llgo_argv globals
- For executable mode, generate full main function with runtime initialization
- This fixes undefined symbol errors when linking libraries that reference these globals
2025-09-11 08:53:17 +08:00
Li Jie
e05c8b9f46 Implement llgo build mode support (#1197)
- Add BuildMode type with three build modes: exe, c-archive, c-shared
- Restrict buildmode flag to llgo build command only (not run/install/test)
- Implement build mode specific linker arguments:
  - c-shared: use -shared -fPIC flags
  - c-archive: use ar tool to create static archive
  - exe: default executable mode
- Add normalizeOutputPath function for platform-specific file naming conventions
- Generate C header files for library modes
- Fix buildmode flag conflict by removing from PassArgs
- Add comprehensive test coverage for all build modes
- Resolve duplicate logic between defaultAppExt and normalizeOutputPath

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 08:53:17 +08:00
xushiwei
d5ad4d997d Merge pull request #1272 from visualfc/cabi_opt
internal/cabi: call optimization
2025-09-10 13:49:48 +08:00
xushiwei
d0962d8adc Merge pull request #1264 from MeteorsLiu/libc-version
Fix xtensa newlib `stdio` stuck and support libc version
2025-09-10 13:46:36 +08:00
xushiwei
d7b9968d9a Merge pull request #1253 from luoliwoshang/release/esp-clang
release:compile & release with esp clang/llvm
2025-09-10 13:40:12 +08:00
xushiwei
b72311cd6d Merge pull request #1275 from luoliwoshang/update/clang
internal/crosscompile:update clang with older glibc & more small size
2025-09-10 13:38:00 +08:00
Haolan
073e79d03b chore: rename ArchiveSrcDir 2025-09-10 11:47:02 +08:00
visualfc
dd50d4dff0 internal/cabi: option optimize 2025-09-09 21:10:53 +08:00
visualfc
b6d43ae88a internal/cabi: transformFuncBody check AttrWidthType(2) 2025-09-09 21:04:24 +08:00
visualfc
89e93f9e7a internal/cabi: transformCallInstr check AttrPointer 2025-09-09 21:04:24 +08:00
visualfc
0b6a558667 internal/cbi: replaceParamAlloc 2025-09-09 21:04:24 +08:00
visualfc
937f8339c7 internal/cabi: call optimization 2025-09-09 21:04:24 +08:00
luoliwoshang
a17f1f0bb0 set origin test
avoid  transform
2025-09-09 19:05:26 +08:00
Haolan
8ce6c3b9ab chore: fix commets and format
Update internal/crosscompile/compile/rtlib/rt_test.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

Update internal/crosscompile/compile/libc/libc_test.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

Update internal/crosscompile/compile/libc/libc_test.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

chore: format contents
2025-09-09 18:23:31 +08:00
Haolan
d4474be921 chore: fix some wrong commets 2025-09-09 18:23:31 +08:00
Haolan
6aa63121ff chore: upgrade newlib 2025-09-09 18:23:31 +08:00
Haolan
b239494a9f test: add test for getting config 2025-09-09 18:23:31 +08:00
Haolan
f573ebe40b fix: xtensa stdio 2025-09-09 18:23:31 +08:00
Haolan
95bd495d7b feat: support libc version 2025-09-09 18:23:31 +08:00
xushiwei
b1d95bb73c Merge pull request #1284 from visualfc/valist_demo
cl/_testrt/vamethod: optimize code
2025-09-09 17:29:38 +08:00
visualfc
5dbf1a7561 cl/_testrt/vamethod: optimize code 2025-09-09 17:25:22 +08:00
xushiwei
0dbc686960 Merge pull request #1281 from goplus/dependabot/github_actions/actions/setup-go-6
build(deps): bump actions/setup-go from 5 to 6
2025-09-09 17:19:39 +08:00
xushiwei
4e7526d68e Merge pull request #1282 from visualfc/embed_vamethod
cl: embed struct / interface support __llgo_va_list
2025-09-09 17:19:16 +08:00
visualfc
fd17a43ade cl: interface support __llgo_va_list 2025-09-09 16:51:08 +08:00
visualfc
89af430329 cl: embed struct support __llgo_va_list 2025-09-09 16:14:25 +08:00
luoliwoshang
e63ebb8151 goreleaser:avoid fail 2025-09-09 15:05:52 +08:00
luoliwoshang
7907e69719 Merge remote-tracking branch 'upstream/main' into release/esp-clang 2025-09-09 14:26:42 +08:00
xushiwei
849b23079b Merge pull request #1279 from luoliwoshang/ci/refreshCacheKey
ci:update .sysroot cache key & catch docker exit
2025-09-09 14:12:48 +08:00
luoliwoshang
3be12dce44 ci:test helloword with embed target 2025-09-09 13:44:56 +08:00
luoliwoshang
f66bbb7fc3 execute rpath search 2025-09-09 12:52:26 +08:00
luoliwoshang
9f48753203 allow sysroot 2025-09-09 12:34:36 +08:00
luoliwoshang
e05f890b94 temp remove origin rpath set 2025-09-09 12:25:39 +08:00
luoliwoshang
d0cf57fa95 ci:test release without llvm dependency 2025-09-09 12:10:14 +08:00
luoliwoshang
92beb562bf goreleaser:relative rpath 2025-09-09 11:57:38 +08:00
luoliwoshang
6ce28e4d4e goreleaser:keep file level 2025-09-09 11:36:29 +08:00
luoliwoshang
0340ef2a75 goreleaser:move clang to result 2025-09-09 11:06:55 +08:00
luoliwoshang
68623f0b27 env:find crosscompile llvm 2025-09-09 10:22:43 +08:00
luoliwoshang
13b5f39125 ci:fail when docker start error 2025-09-09 09:52:22 +08:00
dependabot[bot]
2a022be510 build(deps): bump actions/setup-go from 5 to 6
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 00:44:54 +00:00
luoliwoshang
848432ea68 ci:sysroot for linux 2025-09-08 22:53:39 +08:00
luoliwoshang
a19011897c install with esp-clang & new cache key 2025-09-08 22:52:51 +08:00
luoliwoshang
9cea3226db ci:fail when docker start error 2025-09-08 19:07:12 +08:00
luoliwoshang
bb89ef5c5d ci:refresh ci .sysroot cache key 2025-09-08 17:44:46 +08:00
xushiwei
1556b29e0a Merge pull request #1271 from cpunion/embed-cmds
Embed cmds
2025-09-08 16:00:08 +08:00
Li Jie
d46a3f2f49 Merge commit '7de4137d4678a3bcbd735f887028489f97f1e479' into embed-cmds
# Conflicts:
#	internal/build/build.go
2025-09-08 15:22:48 +08:00
xushiwei
7de4137d46 Merge pull request #1261 from goplus/dependabot/go_modules/github.com/goplus/gogen-1.19.2
build(deps): bump github.com/goplus/gogen from 1.19.1 to 1.19.2
2025-09-08 14:43:53 +08:00