xushiwei
b25ae1b4e7
Merge pull request #1384 from luoliwoshang/feature/export-different-names-1378
...
cl: support //export with different symbol names on embedded targets
2025-11-17 08:10:09 +08:00
luoliwoshang
dac3365c73
cl,build: support //export with different names on embedded targets
...
Add support for using different C symbol names in //export directives
when compiling for embedded targets (enabled via -target flag).
This is for TinyGo compatibility on embedded platforms where hardware
interrupt handlers often require specific naming conventions.
Implementation:
- Add EnableExportRename() to control export rename behavior
- Add isExport parameter to initLink callback for context awareness
- Update initLinknameByDoc() to handle export rename logic:
* When isExport && enableExportRename: allow different names
* Otherwise: require name match
- Clean error handling in initLink():
* export + enableExportRename: silent return (already processed)
* export + !enableExportRename: panic with clear error message
* other cases: warning for missing linkname
Example:
//export LPSPI2_IRQHandler
func interruptLPSPI2() { ... }
The Go function is named interruptLPSPI2 but exported as
LPSPI2_IRQHandler for the hardware vector table.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-10 18:52:36 +08:00
Haolan
2ec5653f5e
feat: implement llgo.stackSave
2025-09-28 09:20:50 +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
luoliwoshang
afee2beebe
cl/instr:rm llgoAsmBase
2025-08-17 18:41:38 +08:00
luoliwoshang
a148964878
feat:llgo.Asm
...
test:asm test with `nop`
2025-08-17 16:50:16 +08:00
xushiwei
915cdf2c23
#1165
2025-06-23 22:01:42 +08:00
xushiwei
b7b6e3bc93
testFrom: use test.Diff
2025-06-23 21:14:26 +08:00
visualfc
c4f0dd124d
cl: funcName check $bound
2025-05-15 21:12:18 +08:00
Li Jie
8512395985
AllocCStr allocates on heap
2025-04-11 16:28:48 +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
Li Jie
c3407eac5e
cgo: supports //export functions only calls in C
2024-11-27 20:24:53 +08:00
Li Jie
90763de93c
cgo: supports c/go callback funcs
2024-11-27 18:41:56 +08:00
Li Jie
5380ffa471
cgo: ignore funcs won't be compiled
2024-11-27 18:41:56 +08:00
Li Jie
d6c527f662
cgo: support macros
2024-11-27 18:41:56 +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
ec38943c53
cl: compile cgo
2024-11-13 20:32:08 +08:00
visualfc
2feb3e1d7a
ssa: prog.linkname; abi llvm.LinkOnceAnyLinkage always
2024-08-20 21:11:27 +08:00
AN Long
bbeceae42e
feat(py): Add Python tuple constructor helper
2024-08-14 21:45:46 +08:00
visualfc
3435b6c4a4
cl: makeInterface check instance named
2024-08-13 21:59:19 +08:00
xushiwei
d480bb3ecd
library: crypto/md5
2024-07-30 02:07:19 +08:00
xushiwei
a5dff9fb15
library: os.ProcessState.String
2024-07-28 23:53:22 +08:00
xushiwei
6f82b36962
library os: openFileNolog
2024-07-19 23:19:59 +08:00
visualfc
830c40440f
build: fix unsafe.Sizeof for llgo:type C
2024-07-17 18:49:18 +08:00
xushiwei
e138951e9e
c.AllocaCStrs; ssa: AllocaU/ArrayAlloca/Times/AllocaCStrs
2024-07-12 21:40:13 +08:00
xushiwei
11682e487e
c/os: fork/exec
2024-07-12 00:39:16 +08:00
xushiwei
d0b57535ed
support: internal/oserror, io, io/fs
2024-07-11 18:20:12 +08:00
xushiwei
e4ae0980b4
x
2024-07-09 12:42:20 +08:00
xushiwei
e41da0d697
cl handleTypeDecl: typeBackground
2024-07-09 12:38:34 +08:00
visualfc
22a2cc564f
cl: parser llgo:type C
2024-07-09 10:00:31 +08:00
xushiwei
e55e90db1a
py.Str; py.FromCStr/FromCStrAndLen/FromGoString
2024-07-04 18:34:00 +08:00
luoliwoshang
6f678294a0
link:not exist method warning
2024-07-02 17:37:32 +08:00
xushiwei
fe18c35dab
patch: Clone/Merge
2024-06-28 15:14:30 +08:00
xushiwei
48a1384197
patch: fmt, os, runtime, syscall, time
2024-06-26 17:17:10 +08:00
xushiwei
4385ca0966
patch: internal/abi
2024-06-25 14:02:25 +08:00
xushiwei
bfa4e08a4e
cl: c.Func (llgo.funcAddr); demo: cppintf (how to use c++ interface)
2024-06-21 23:44:56 +08:00
xushiwei
b93fc3f028
patch internal/reflectlite; demo: sort.Ints
2024-06-21 11:02:28 +08:00
xushiwei
f8b0a7105b
patch: reflect (type)
2024-06-20 14:17:37 +08:00
xushiwei
f7d7f81c49
library: strconv
2024-06-20 11:05:43 +08:00
xushiwei
607deaa3c4
patch: syscall
2024-06-20 02:55:26 +08:00
xushiwei
3ead4b4d4b
llgo.string; c string library
2024-06-19 23:40:05 +08:00
xushiwei
3c0e321538
patch: io, io/fs, os
2024-06-19 22:21:44 +08:00
visualfc
d59075e897
build: instantiate generics
2024-06-18 19:26:52 +08:00
xushiwei
7a15cf1157
patch: errors (todo)
2024-06-18 13:50:55 +08:00
xushiwei
3b2e97a729
globalType: support typepatch
2024-06-18 00:06:40 +08:00