move out c/cpp/py

This commit is contained in:
Li Jie
2025-04-03 15:52:18 +08:00
parent 0a8a4eb6a6
commit ed366568b4
777 changed files with 4608 additions and 139122 deletions

View File

@@ -1,6 +1,6 @@
package main
import "github.com/goplus/llgo/c/math"
import "github.com/goplus/lib/c/math"
func main() {
println("sqrt(2) =", math.Sqrt(2))

View File

@@ -1,9 +1,9 @@
package main
import (
"github.com/goplus/llgo/py"
"github.com/goplus/llgo/py/math"
"github.com/goplus/llgo/py/std"
"github.com/goplus/lib/py"
"github.com/goplus/lib/py/math"
"github.com/goplus/lib/py/std"
)
func main() {

View File

@@ -1,9 +1,9 @@
package main
import (
"github.com/goplus/llgo/py"
"github.com/goplus/llgo/py/numpy"
"github.com/goplus/llgo/py/std"
"github.com/goplus/lib/py"
"github.com/goplus/lib/py/numpy"
"github.com/goplus/lib/py/std"
)
func main() {

View File

@@ -1,6 +1,6 @@
package main
import "github.com/goplus/llgo/c"
import "github.com/goplus/lib/c"
func main() {
c.Printf(c.Str("Hello world\n"))

View File

@@ -1,9 +1,9 @@
# shellcheck disable=all
git clone https://github.com/goplus/llgo.git
cd llgo/compiler
cd llgo
go install -v ./cmd/...
go install -v ./chore/... # compile all tools except pydump
export LLGO_ROOT=$PWD/..
cd ../_xtool
export LLGO_ROOT=$PWD
cd _xtool
llgo install ./... # compile pydump
go install github.com/goplus/hdq/chore/pysigfetch@v0.8.1 # compile pysigfetch

View File

@@ -1,6 +1,8 @@
# shellcheck disable=all
DIR=$(cd "$(dirname "$0")" && pwd)
brew update
brew install llvm@19 lld@19 bdw-gc openssl cjson libffi libuv pkg-config
brew install python@3.12 # optional
brew link --overwrite lld@19 libffi
curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash
# curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash
cat ${DIR}/../../../install.sh | bash

View File

@@ -4,4 +4,5 @@ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y llvm-19-dev clang-19 libclang-19-dev lld-19 pkg-config libgc-dev libssl-dev zlib1g-dev libcjson-dev libsqlite3-dev libunwind-dev libuv1-dev
sudo apt-get install -y python3.12-dev # optional
curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash
#curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash
cat ../../../install.sh | bash