Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed Apr 26, 2024
1 parent c3af00d commit 095afab
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 65 deletions.
3 changes: 1 addition & 2 deletions compile/bootstrap.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
local lm = require "luamake"
lm.rootdir = ".."

require "config"
lm:import "common.lua"
require "common"

lm:source_set "source_bootstrap" {
deps = {
Expand Down
60 changes: 60 additions & 0 deletions compile/common.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,64 @@
local lm = require "luamake"
lm:required_version "1.6"

lm:conf {
c = "c11",
cxx = "c++17",
rtti = "off",
windows = {
defines = "_WIN32_WINNT=0x0602",
},
msvc = {
flags = "/utf-8",
ldflags = lm.mode == "debug" and lm.arch == "x86_64" and {
"/STACK:"..0x160000
},
},
macos = {
flags = "-Wunguarded-availability",
sys = "macos10.15",
},
linux = {
crt = "static",
flags = "-fPIC",
ldflags = {
"-Wl,-E",
"-static-libgcc",
},
},
netbsd = {
crt = "static",
ldflags = "-Wl,-E",
},
freebsd = {
crt = "static",
ldflags = "-Wl,-E",
},
openbsd = {
crt = "static",
ldflags = "-Wl,-E",
},
android = {
ldflags = "-Wl,-E",
},
}

if lm.sanitize then
lm:conf {
mode = "debug",
flags = "-fsanitize=address",
gcc = {
ldflags = "-fsanitize=address"
},
clang = {
ldflags = "-fsanitize=address"
}
}
lm:msvc_copydll "sanitize-dll" {
type = "asan",
outputs = "$bin"
}
end

lm:lua_src "source_bee" {
sources = "3rd/lua-seri/lua-seri.c",
Expand Down
61 changes: 0 additions & 61 deletions compile/config.lua

This file was deleted.

3 changes: 1 addition & 2 deletions compile/lua.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
local lm = require "luamake"
lm.rootdir = ".."

require "config"
lm:import "common.lua"
require "common"

lm:lua_dll "bee" {
deps = "source_bee",
Expand Down

0 comments on commit 095afab

Please sign in to comment.