提交 42a5c407 编写于 作者: B Ben Shi

llvm: fix broken native build mode.

上级 5589c501
#! /bin/bash
wa native --target=avr arduino_blink.wa
wa native array_0.wa
wa native array_1.wa
wa native array_2.wa
wa native bitwise_logic.wa
wa native compare.wa
wa native convert_0.wa
wa native convert_1.wa
wa native convert_2.wa
wa native convert_3.wa
wa native float32.wa
wa native global_constant.wa
wa native global_variable_0.wa
wa native global_variable_1.wa
wa native heart.wa
wa native loop_0.wa
wa native loop_1.wa
wa native multi_ret.wa
wa native pointer.wa
wa native prime.wa
wa native print_0.wa
wa native print_1.wa
wa native print_2.wa
wa native print_3.wa
wa native shift.wa
wa native struct_0.wa
wa native struct_1.wa
wa native struct_2.wa
wa native struct_3.wa
wa native unconditional_jump.wa
rm -f *.ll *.s
......@@ -44,6 +44,9 @@ func (opt *Option) Config() *config.Config {
case "arm64":
cfg.WaSizes.MaxAlign = 8
cfg.WaSizes.WordSize = 8
case "native":
cfg.WaSizes.MaxAlign = 8
cfg.WaSizes.WordSize = 8
default:
panic("todo")
}
......
......@@ -304,7 +304,7 @@ func main() {
}
infile = c.Args().First()
ctx := app.NewApp(build_Options(c))
ctx := app.NewApp(build_Options(c, true))
if err := ctx.LLVM(infile, outfile, target, debug); err != nil {
fmt.Println(err)
os.Exit(1)
......@@ -472,6 +472,7 @@ func build_Options(c *cli.Context, isLLVMBackend ...bool) *app.Option {
opt.TargetArch = "wasm"
if len(isLLVMBackend) > 0 && isLLVMBackend[0] {
opt.TargetArch = "native"
return opt
}
switch c.String("target") {
case "wa", config.WaOS_Walang:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册