feat: add export symbol name test to CI for embedded targets

- Created _demo/embed/export/ with test for //export directive
- Test verifies symbols are exported with correct names (LPSPI2_IRQHandler, SysTick_Handler)
- Added CI workflow step to run the test
- Essential for embedded development where hardware requires specific symbol names

🤖 Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
This commit is contained in:
xgopilot
2025-10-31 04:07:37 +00:00
parent c36ccfd9a1
commit c0a3a19294
3 changed files with 147 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package main
//export LPSPI2_IRQHandler
func interruptLPSPI2() {
println("LPSPI2 interrupt handled")
}
//export SysTick_Handler
func systemTickHandler() {
println("System tick")
}
//export Add
func Add(a, b int) int {
return a + b
}
func main() {
interruptLPSPI2()
systemTickHandler()
println("Add(2, 3) =", Add(2, 3))
}