From d9d813db56d91e20a4232d718f0b9f8ac069bb6e Mon Sep 17 00:00:00 2001 From: xushiwei Date: Mon, 28 Apr 2025 00:35:45 +0800 Subject: [PATCH] go/parser demo --- _cmptest/{_goparsedemo => goparsedemo}/parse.go | 0 go.mod | 2 +- runtime/internal/lib/runtime/compiler.go | 13 +++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) rename _cmptest/{_goparsedemo => goparsedemo}/parse.go (100%) create mode 100644 runtime/internal/lib/runtime/compiler.go diff --git a/_cmptest/_goparsedemo/parse.go b/_cmptest/goparsedemo/parse.go similarity index 100% rename from _cmptest/_goparsedemo/parse.go rename to _cmptest/goparsedemo/parse.go diff --git a/go.mod b/go.mod index 6acc0c66..53586e7f 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ toolchain go1.24.1 require ( github.com/goplus/gogen v1.17.2 github.com/goplus/lib v0.2.0 - github.com/goplus/llgo/runtime v0.0.0-20250403035532-0a8a4eb6a653 + github.com/goplus/llgo/runtime v0.0.0-00010101000000-000000000000 github.com/goplus/llvm v0.8.3 github.com/goplus/mod v0.16.0 github.com/qiniu/x v1.13.19 diff --git a/runtime/internal/lib/runtime/compiler.go b/runtime/internal/lib/runtime/compiler.go new file mode 100644 index 00000000..e79e34b2 --- /dev/null +++ b/runtime/internal/lib/runtime/compiler.go @@ -0,0 +1,13 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package runtime + +// Compiler is the name of the compiler toolchain that built the +// running binary. Known toolchains are: +// +// - gc Also known as cmd/compile. +// - gccgo The gccgo front end, part of the GCC compiler suite. +// - llgo Our proect +const Compiler = "llgo"