Skip to content

Commit

Permalink
更新bee
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed Mar 16, 2023
1 parent 50d5bef commit f064b43
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 151 deletions.
2 changes: 1 addition & 1 deletion bee.lua
Submodule bee.lua updated 53 files
+0 −0 3rd/filesystem.h
+0 −0 3rd/fmt/fmt/args.h
+0 −0 3rd/fmt/fmt/chrono.h
+0 −0 3rd/fmt/fmt/color.h
+0 −0 3rd/fmt/fmt/compile.h
+0 −0 3rd/fmt/fmt/core.h
+0 −0 3rd/fmt/fmt/format-inl.h
+0 −0 3rd/fmt/fmt/format.h
+0 −0 3rd/fmt/fmt/ostream.h
+0 −0 3rd/fmt/fmt/printf.h
+0 −0 3rd/fmt/fmt/ranges.h
+0 −0 3rd/fmt/fmt/std.h
+0 −0 3rd/fmt/fmt/xchar.h
+0 −0 3rd/fmt/format.cc
+2 −3 bee/filewatch/filewatch.h
+3 −3 bee/filewatch/filewatch_linux.cpp
+1 −1 bee/filewatch/filewatch_osx.cpp
+15 −14 bee/filewatch/filewatch_win.cpp
+55 −37 bee/net/endpoint.cpp
+22 −10 bee/net/endpoint.h
+47 −62 bee/net/socket.cpp
+6 −4 bee/net/socket.h
+1 −1 bee/nonstd/filesystem.h
+4 −4 bee/nonstd/format.h
+20 −22 bee/nonstd/semaphore.h
+26 −29 bee/platform/version.cpp
+17 −1 bee/platform/win/module_version.h
+42 −94 bee/platform/win/module_version_win.cpp
+7 −7 bee/platform/win/unicode.h
+6 −6 bee/platform/win/unicode_win.cpp
+7 −7 bee/subprocess/common.h
+15 −17 bee/subprocess/subprocess_posix.cpp
+20 −2 bee/subprocess/subprocess_posix.h
+27 −24 bee/subprocess/subprocess_win.cpp
+15 −5 bee/subprocess/subprocess_win.h
+16 −14 bee/thread/spinlock.h
+112 −0 bee/utility/dynarray.h
+0 −1 bee/utility/file_handle_bsd.cpp
+0 −1 bee/utility/file_handle_linux.cpp
+0 −1 bee/utility/file_handle_posix.cpp
+5 −6 bee/utility/file_handle_win.cpp
+3 −3 bee/utility/path_helper.cpp
+72 −0 bee/utility/zstring_view.h
+4 −3 binding/binding.h
+1 −2 binding/lua_filewatch.cpp
+1 −1 binding/lua_serialization.cpp
+22 −23 binding/lua_socket.cpp
+3 −3 binding/lua_subprocess.cpp
+6 −6 binding/lua_thread.cpp
+2 −2 bootstrap/main.lua
+9 −13 compile/bootstrap.lua
+3 −8 compile/common.lua
+8 −4 test/ltest/ltest.lua
30 changes: 14 additions & 16 deletions compile/ninja/android.ninja
Expand Up @@ -6,22 +6,19 @@ cc = gcc
luamake = luamake
rule c_source_bee
command = $cc -MMD -MT $out -MF $out.d -O2 -Wall -Werror $
-fvisibility=hidden -Ibee.lua/3rd/lua-seri -Itools/lua54 -DNDEBUG -o $
$out -c $in
-fvisibility=hidden -Itools/lua54 -DNDEBUG -o $out -c $in
description = Compile C $out
deps = gcc
depfile = $out.d
build $obj/source_bee/lua-seri.obj: c_source_bee $
bee.lua/3rd/lua-seri/lua-seri.c
rule cxx_source_bee
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -Ibee.lua/bee/nonstd/3rd -DNDEBUG -o $out $
-c $in
-Werror -fvisibility=hidden -DNDEBUG -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/source_bee/format.obj: cxx_source_bee $
bee.lua/bee/nonstd/3rd/fmt/format.cc
build $obj/source_bee/format.obj: cxx_source_bee bee.lua/3rd/fmt/format.cc
rule cxx_source_bee_1
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -Ibee.lua -DNDEBUG -o $out -c $in
Expand Down Expand Up @@ -50,8 +47,8 @@ build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
bee.lua/bee/utility/path_helper.cpp
rule cxx_source_bee_2
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -Ibee.lua/3rd/lua-seri -Ibee.lua $
-Itools/lua54 -DBEE_STATIC -DNDEBUG -o $out -c $in
-Werror -fvisibility=hidden -Ibee.lua -Itools/lua54 -DBEE_STATIC $
-DNDEBUG -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
Expand Down Expand Up @@ -97,10 +94,10 @@ build $obj/source_bootstrap/main.obj: cxx_source_bootstrap $
bee.lua/bootstrap/main.cpp
build $obj/source_bootstrap/progdir.obj: cxx_source_bootstrap $
bee.lua/bootstrap/progdir.cpp
rule link_luamake
rule link_bootstrap
command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++ -s
description = Link Exe $out
build $bin/luamake: link_luamake $obj/source_bootstrap/main.obj $
build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
$obj/source_bootstrap/progdir.obj $obj/source_bee/lua-seri.obj $
$obj/source_bee/format.obj $obj/source_bee/error.obj $
$obj/source_bee/filewatch_linux.obj $obj/source_bee/endpoint.obj $
Expand All @@ -119,10 +116,10 @@ rule copy
command = cp -fv $in$input $out 1>/dev/null
description = Copy $in$input $out
restat = 1
build $bin/main.lua: copy | $bin/luamake
build $bin/main.lua: copy | $bin/bootstrap
input = bee.lua/bootstrap/main.lua
rule test
command = $bin/luamake bee.lua/test/test.lua --touch $out
command = $bin/bootstrap bee.lua/test/test.lua --touch $out
description = Run test.
pool = console
build $obj/test.stamp: test bee.lua/test/console.lua $
Expand All @@ -133,10 +130,11 @@ build $obj/test.stamp: test bee.lua/test/console.lua $
bee.lua/test/test_filesystem.lua bee.lua/test/test_filewatch.lua $
bee.lua/test/test_lua.lua bee.lua/test/test_serialization.lua $
bee.lua/test/test_socket.lua bee.lua/test/test_subprocess.lua $
bee.lua/test/test_thread.lua bee.lua/test/test_time.lua | $bin/luamake $
copy_script
build luamake: copy | $bin/luamake
input = $bin/luamake
bee.lua/test/test_thread.lua bee.lua/test/test_time.lua | $
$bin/bootstrap copy_script
build luamake: copy | $bin/bootstrap
input = $bin/bootstrap
build bootstrap: phony $bin/bootstrap
build copy_script: phony $bin/main.lua
build test: phony $obj/test.stamp
build copy_luamake: phony luamake
Expand Down
30 changes: 14 additions & 16 deletions compile/ninja/freebsd.ninja
Expand Up @@ -6,22 +6,19 @@ cc = clang
luamake = luamake
rule c_source_bee
command = $cc -MMD -MT $out -MF $out.d -O2 -Wall -Werror $
-fvisibility=hidden -Ibee.lua/3rd/lua-seri -Itools/lua54 -DNDEBUG -o $
$out -c $in
-fvisibility=hidden -Itools/lua54 -DNDEBUG -o $out -c $in
description = Compile C $out
deps = gcc
depfile = $out.d
build $obj/source_bee/lua-seri.obj: c_source_bee $
bee.lua/3rd/lua-seri/lua-seri.c
rule cxx_source_bee
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -Ibee.lua/bee/nonstd/3rd -DNDEBUG -o $out $
-c $in
-Werror -fvisibility=hidden -DNDEBUG -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/source_bee/format.obj: cxx_source_bee $
bee.lua/bee/nonstd/3rd/fmt/format.cc
build $obj/source_bee/format.obj: cxx_source_bee bee.lua/3rd/fmt/format.cc
rule cxx_source_bee_1
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -Ibee.lua -isystem /usr/local/include $
Expand Down Expand Up @@ -51,8 +48,8 @@ build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
bee.lua/bee/utility/path_helper.cpp
rule cxx_source_bee_2
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -Ibee.lua/3rd/lua-seri -Ibee.lua $
-Itools/lua54 -DBEE_STATIC -DNDEBUG -o $out -c $in
-Werror -fvisibility=hidden -Ibee.lua -Itools/lua54 -DBEE_STATIC $
-DNDEBUG -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
Expand Down Expand Up @@ -98,11 +95,11 @@ build $obj/source_bootstrap/main.obj: cxx_source_bootstrap $
bee.lua/bootstrap/main.cpp
build $obj/source_bootstrap/progdir.obj: cxx_source_bootstrap $
bee.lua/bootstrap/progdir.cpp
rule link_luamake
rule link_bootstrap
command = $cc $in -o $out -lm -Wl,-E -linotify -L/usr/local/lib -pthread $
-lstdc++ -Wl,-S,-x
description = Link Exe $out
build $bin/luamake: link_luamake $obj/source_bootstrap/main.obj $
build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
$obj/source_bootstrap/progdir.obj $obj/source_bee/lua-seri.obj $
$obj/source_bee/format.obj $obj/source_bee/error.obj $
$obj/source_bee/filewatch_bsd.obj $obj/source_bee/endpoint.obj $
Expand All @@ -121,10 +118,10 @@ rule copy
command = cp -fv $in$input $out 1>/dev/null
description = Copy $in$input $out
restat = 1
build $bin/main.lua: copy | $bin/luamake
build $bin/main.lua: copy | $bin/bootstrap
input = bee.lua/bootstrap/main.lua
rule test
command = $bin/luamake bee.lua/test/test.lua --touch $out
command = $bin/bootstrap bee.lua/test/test.lua --touch $out
description = Run test.
pool = console
build $obj/test.stamp: test bee.lua/test/console.lua $
Expand All @@ -135,10 +132,11 @@ build $obj/test.stamp: test bee.lua/test/console.lua $
bee.lua/test/test_filesystem.lua bee.lua/test/test_filewatch.lua $
bee.lua/test/test_lua.lua bee.lua/test/test_serialization.lua $
bee.lua/test/test_socket.lua bee.lua/test/test_subprocess.lua $
bee.lua/test/test_thread.lua bee.lua/test/test_time.lua | $bin/luamake $
copy_script
build luamake: copy | $bin/luamake
input = $bin/luamake
bee.lua/test/test_thread.lua bee.lua/test/test_time.lua | $
$bin/bootstrap copy_script
build luamake: copy | $bin/bootstrap
input = $bin/bootstrap
build bootstrap: phony $bin/bootstrap
build copy_script: phony $bin/main.lua
build test: phony $obj/test.stamp
build copy_luamake: phony luamake
Expand Down
30 changes: 14 additions & 16 deletions compile/ninja/linux.ninja
Expand Up @@ -6,22 +6,19 @@ cc = gcc
luamake = luamake
rule c_source_bee
command = $cc -MMD -MT $out -MF $out.d -O2 -Wall -Werror $
-fvisibility=hidden -Ibee.lua/3rd/lua-seri -Itools/lua54 -DNDEBUG -fPIC $
-o $out -c $in
-fvisibility=hidden -Itools/lua54 -DNDEBUG -fPIC -o $out -c $in
description = Compile C $out
deps = gcc
depfile = $out.d
build $obj/source_bee/lua-seri.obj: c_source_bee $
bee.lua/3rd/lua-seri/lua-seri.c
rule cxx_source_bee
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -Ibee.lua/bee/nonstd/3rd -DNDEBUG -fPIC -o $
$out -c $in
-Werror -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/source_bee/format.obj: cxx_source_bee $
bee.lua/bee/nonstd/3rd/fmt/format.cc
build $obj/source_bee/format.obj: cxx_source_bee bee.lua/3rd/fmt/format.cc
rule cxx_source_bee_1
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -Ibee.lua -DNDEBUG -fPIC -o $out -c $in
Expand Down Expand Up @@ -50,8 +47,8 @@ build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
bee.lua/bee/utility/path_helper.cpp
rule cxx_source_bee_2
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -Ibee.lua/3rd/lua-seri -Ibee.lua $
-Itools/lua54 -DBEE_STATIC -DNDEBUG -fPIC -o $out -c $in
-Werror -fvisibility=hidden -Ibee.lua -Itools/lua54 -DBEE_STATIC $
-DNDEBUG -fPIC -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
Expand Down Expand Up @@ -97,11 +94,11 @@ build $obj/source_bootstrap/main.obj: cxx_source_bootstrap $
bee.lua/bootstrap/main.cpp
build $obj/source_bootstrap/progdir.obj: cxx_source_bootstrap $
bee.lua/bootstrap/progdir.cpp
rule link_luamake
rule link_bootstrap
command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++fs -pthread $
-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc -s
description = Link Exe $out
build $bin/luamake: link_luamake $obj/source_bootstrap/main.obj $
build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
$obj/source_bootstrap/progdir.obj $obj/source_bee/lua-seri.obj $
$obj/source_bee/format.obj $obj/source_bee/error.obj $
$obj/source_bee/filewatch_linux.obj $obj/source_bee/endpoint.obj $
Expand All @@ -120,10 +117,10 @@ rule copy
command = cp -fv $in$input $out 1>/dev/null
description = Copy $in$input $out
restat = 1
build $bin/main.lua: copy | $bin/luamake
build $bin/main.lua: copy | $bin/bootstrap
input = bee.lua/bootstrap/main.lua
rule test
command = $bin/luamake bee.lua/test/test.lua --touch $out
command = $bin/bootstrap bee.lua/test/test.lua --touch $out
description = Run test.
pool = console
build $obj/test.stamp: test bee.lua/test/console.lua $
Expand All @@ -134,10 +131,11 @@ build $obj/test.stamp: test bee.lua/test/console.lua $
bee.lua/test/test_filesystem.lua bee.lua/test/test_filewatch.lua $
bee.lua/test/test_lua.lua bee.lua/test/test_serialization.lua $
bee.lua/test/test_socket.lua bee.lua/test/test_subprocess.lua $
bee.lua/test/test_thread.lua bee.lua/test/test_time.lua | $bin/luamake $
copy_script
build luamake: copy | $bin/luamake
input = $bin/luamake
bee.lua/test/test_thread.lua bee.lua/test/test_time.lua | $
$bin/bootstrap copy_script
build luamake: copy | $bin/bootstrap
input = $bin/bootstrap
build bootstrap: phony $bin/bootstrap
build copy_script: phony $bin/main.lua
build test: phony $obj/test.stamp
build copy_luamake: phony luamake
Expand Down
34 changes: 17 additions & 17 deletions compile/ninja/macos.ninja
Expand Up @@ -6,22 +6,21 @@ cc = clang
luamake = luamake
rule c_source_bee
command = $cc -MMD -MT $out -MF $out.d -O2 -Wall -Werror $
-fvisibility=hidden -mmacosx-version-min=10.15 -Ibee.lua/3rd/lua-seri $
-Itools/lua54 -DNDEBUG -Wunguarded-availability -o $out -c $in
-fvisibility=hidden -mmacosx-version-min=10.15 -Itools/lua54 -DNDEBUG $
-Wunguarded-availability -o $out -c $in
description = Compile C $out
deps = gcc
depfile = $out.d
build $obj/source_bee/lua-seri.obj: c_source_bee $
bee.lua/3rd/lua-seri/lua-seri.c
rule cxx_source_bee
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -mmacosx-version-min=10.15 $
-Ibee.lua/bee/nonstd/3rd -DNDEBUG -Wunguarded-availability -o $out -c $in
-Werror -fvisibility=hidden -mmacosx-version-min=10.15 -DNDEBUG $
-Wunguarded-availability -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/source_bee/format.obj: cxx_source_bee $
bee.lua/bee/nonstd/3rd/fmt/format.cc
build $obj/source_bee/format.obj: cxx_source_bee bee.lua/3rd/fmt/format.cc
rule cxx_source_bee_1
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -mmacosx-version-min=10.15 -Ibee.lua $
Expand Down Expand Up @@ -51,9 +50,9 @@ build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
bee.lua/bee/utility/path_helper.cpp
rule cxx_source_bee_2
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-Werror -fvisibility=hidden -mmacosx-version-min=10.15 $
-Ibee.lua/3rd/lua-seri -Ibee.lua -Itools/lua54 -DBEE_STATIC -DNDEBUG $
-Wunguarded-availability -o $out -c $in
-Werror -fvisibility=hidden -mmacosx-version-min=10.15 -Ibee.lua $
-Itools/lua54 -DBEE_STATIC -DNDEBUG -Wunguarded-availability -o $out -c $
$in
description = Compile C++ $out
deps = gcc
depfile = $out.d
Expand Down Expand Up @@ -102,11 +101,11 @@ build $obj/source_bootstrap/main.obj: cxx_source_bootstrap $
bee.lua/bootstrap/main.cpp
build $obj/source_bootstrap/progdir.obj: cxx_source_bootstrap $
bee.lua/bootstrap/progdir.cpp
rule link_luamake
rule link_bootstrap
command = $cc $in -o $out -lm -ldl -framework Foundation -framework $
CoreFoundation -framework CoreServices -lstdc++ -Wl,-S,-x
description = Link Exe $out
build $bin/luamake: link_luamake $obj/source_bootstrap/main.obj $
build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
$obj/source_bootstrap/progdir.obj $obj/source_bee/lua-seri.obj $
$obj/source_bee/format.obj $obj/source_bee/error.obj $
$obj/source_bee/filewatch_osx.obj $obj/source_bee/endpoint.obj $
Expand All @@ -125,10 +124,10 @@ rule copy
command = cp -fv $in$input $out 1>/dev/null
description = Copy $in$input $out
restat = 1
build $bin/main.lua: copy | $bin/luamake
build $bin/main.lua: copy | $bin/bootstrap
input = bee.lua/bootstrap/main.lua
rule test
command = $bin/luamake bee.lua/test/test.lua --touch $out
command = $bin/bootstrap bee.lua/test/test.lua --touch $out
description = Run test.
pool = console
build $obj/test.stamp: test bee.lua/test/console.lua $
Expand All @@ -139,10 +138,11 @@ build $obj/test.stamp: test bee.lua/test/console.lua $
bee.lua/test/test_filesystem.lua bee.lua/test/test_filewatch.lua $
bee.lua/test/test_lua.lua bee.lua/test/test_serialization.lua $
bee.lua/test/test_socket.lua bee.lua/test/test_subprocess.lua $
bee.lua/test/test_thread.lua bee.lua/test/test_time.lua | $bin/luamake $
copy_script
build luamake: copy | $bin/luamake
input = $bin/luamake
bee.lua/test/test_thread.lua bee.lua/test/test_time.lua | $
$bin/bootstrap copy_script
build luamake: copy | $bin/bootstrap
input = $bin/bootstrap
build bootstrap: phony $bin/bootstrap
build copy_script: phony $bin/main.lua
build test: phony $obj/test.stamp
build copy_luamake: phony luamake
Expand Down

0 comments on commit f064b43

Please sign in to comment.