提交 7624c7f5 编写于 作者: B Ben Shi

Add a new test case.

上级 e32e139e
# 版权 @2022 凹语言 作者。保留所有权利。
fn main {
println("你好,凹语言", '!')
println("your lucky numbers:", calc1(6, 9, 8), ", ", 5, ", ", 5.44, ", ", calc3(6, 9, 8))
}
fn calc0(a: i32, b: i32, c: i32) i32 {
return (-a) * 5 / (b - c + 2)
}
fn calc1(a: i32, b: i32, c: i32) i32 {
return calc0(a, b, c)
}
fn calc2(a: float32, b: float32, c: float32) float32 {
return (-a) * 5 / (b - c + 2)
}
fn calc3(a: float32, b: float32, c: float32) float32 {
return calc2(a, b, c)
}
......@@ -318,7 +318,7 @@ func (p *App) LLVM(infile string, outfile string, target string) error {
}
// Invoke command `clang infile.s -o outfile --target=xxx`.
clang := []string{infile + ".s", "-o", outfile}
clang := []string{infile + ".s", "-static", "-o", outfile}
if target != "" {
clang = append(clang, "-target", target)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册