mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
compiler.cpp build fix, fixes
This commit is contained in:
parent
26d2eaa8b3
commit
13ea4c7968
5 changed files with 9 additions and 9 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <optional>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
xmake build
|
# xmake build
|
||||||
cp "build/linux/x86_64/release/byterun" byterun.exe
|
# cp "build/linux/x86_64/release/byterun" byterun.exe
|
||||||
|
|
||||||
# dune build > /dev/null
|
dune build > /dev/null
|
||||||
|
|
||||||
prefix="../regression/"
|
prefix="../regression/"
|
||||||
suffix=".lama"
|
suffix=".lama"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
// based on src/X86_64.ml
|
// based on src/X86_64.ml
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
#include "../../runtime/runtime.h"
|
#include "../../runtime/runtime.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include "compiler.hpp"
|
#include "compiler.hpp"
|
||||||
#include "sm_parser.hpp"
|
#include "sm_parser.hpp"
|
||||||
|
|
@ -1955,7 +1957,7 @@ std::vector<Instr> compile(const Options &cmd, Env &env,
|
||||||
std::vector<std::string>{imports},
|
std::vector<std::string>{imports},
|
||||||
[](const auto &i) { return i != "Std"; }),
|
[](const auto &i) { return i != "Std"; }),
|
||||||
[](const auto &i) -> Instr {
|
[](const auto &i) -> Instr {
|
||||||
return Call{std::format("init" + i)};
|
return Call{std::format("init {}", i)};
|
||||||
}) : std::vector<Instr>{}),
|
}) : std::vector<Instr>{}),
|
||||||
std::move(check_argc_code)
|
std::move(check_argc_code)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
|
|
||||||
|
|
@ -5,7 +5,7 @@ set_languages("c++23", "c23")
|
||||||
|
|
||||||
target("byterun")
|
target("byterun")
|
||||||
set_kind("binary")
|
set_kind("binary")
|
||||||
add_includedirs("include")
|
add_includedirs("include", "../runtime")
|
||||||
add_files("../runtime/**.c", "../runtime/**.S")
|
add_files("../runtime/**.c", "../runtime/**.S")
|
||||||
add_files( "src/**.cpp", "src/**.c")
|
add_files( "src/**.cpp", "src/**.c")
|
||||||
set_warnings("allextra")
|
set_warnings("allextra")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue