Commit Graph

208 Commits

Author SHA1 Message Date
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
Li Jie
4c5f37db0f debug symbols switch 2024-09-18 21:14:04 +08:00
Li Jie
3e5338c902 ssa: add llvm debug info 2024-09-18 21:14:04 +08:00
xushiwei
7a068450b3 Merge pull request #764 from cpunion/ssa-error-exit
cl: exit 1 when SSA build error
2024-09-05 08:42:21 +08:00
Li Jie
e9aaf8e0af cl: builtin llgo tag 2024-09-04 10:07:22 +08:00
Li Jie
7a80e407af cl: exit 1 when SSA build error 2024-09-04 09:55:56 +08:00
xushiwei
6c72846d63 llgo cmptest -gen 2024-08-14 09:47:40 +08:00
Aofei Sheng
200fe07473 cmptest: add support for comparison with llgo.expect files
Fixes #671
2024-08-12 13:52:20 +08:00
xushiwei
29c74c09ce library/README: crypto/hmac, crypto/subtle 2024-08-06 17:19:31 +08:00
tsingbx
6a05aa4e53 llgo support crypto hmac (#663)
* llgo support crypto/hmac
2024-08-06 16:47:51 +08:00
xushiwei
2e4b1d8c2b library: math/big.Int (mini-impl for _cmptest/bigintdemo) 2024-08-01 00:32:21 +08:00
tsingbx
2d7958f726 add crypto sha1, sha256, sha512 2024-07-31 13:56:42 +08:00
xushiwei
af6e4abe84 library: crypto/rand 2024-07-31 10:26:18 +08:00
xushiwei
cacd52f81d library: math/rand 2024-07-30 21:41:26 +08:00
xushiwei
1eaf124d4e library: hash/{crc32, adler32} 2024-07-30 19:36:36 +08:00
Aofei Sheng
68fa3dadb0 build: replicate macOS -dead_strip optimization on Linux
Added `-fdata-sections` and `-ffunction-sections` compiler flags to work
with `--gc-sections` on Linux. This combination achieves similar dead
code elimination as macOS's `-dead_strip`, reducing binary size and
resolving undefined symbol issues. Ensures consistent optimization
across macOS and Linux builds.
2024-07-30 08:52:29 +08:00
xushiwei
d480bb3ecd library: crypto/md5 2024-07-30 02:07:19 +08:00
Aofei Sheng
3b5e8edd37 ssa: fix Builder.Sigsetjmp for Linux
This follows up on #597.
2024-07-29 16:52:24 +08:00
Aofei Sheng
e7d72b6f53 build: fix sigsetjmp issues and ensure required libs on Linux
1. Handle `sigsetjmp` platform differences:
   - Separate `sigsetjmp` linkage to platform-specific files.
   - Use `__sigsetjmp` on Linux to handle `sigsetjmp` being a macro.
   - Maintain original implementation for Darwin.

2. Ensure linking of required libs:
   - Explicitly link against fundamental libs (e.g., libm, libatomic).
   - Address the fact that typical Linux linkers don't link these by
     default.
2024-07-29 11:16:04 +08:00
xushiwei
a5dff9fb15 library: os.ProcessState.String 2024-07-28 23:53:22 +08:00
visualfc
6c7db7ad23 build: patch io.pipe 2024-07-28 17:01:34 +08:00
visualfc
aa55f4dceb internal/build: add io.pipe for overlay 2024-07-27 12:32:33 +08:00
luoliwoshang
18de4e57eb env:fix incorrect extra line breaks & subcmd match 2024-07-23 14:32:44 +08:00
xushiwei
6f82b36962 library os: openFileNolog 2024-07-19 23:19:59 +08:00
xushiwei
f8bacfcc67 Merge pull request #524 from visualfc/sizes
build: fix unsafe.Sizeof for llgo:type C
2024-07-18 06:58:33 +08:00
Aofei Sheng
74012d4869 build(macOS): change full library paths to @rpath 2024-07-17 18:50:13 +08:00
visualfc
830c40440f build: fix unsafe.Sizeof for llgo:type C 2024-07-17 18:49:18 +08:00
Aofei Sheng
afa9a00259 build: fix rpath support on Linux 2024-07-15 23:04:07 +08:00
xushiwei
2fcfac9e84 build: support rpath 2024-07-15 10:13:01 +08:00