Skip to content

Commit

Permalink
update bee
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed May 7, 2024
1 parent 54f9013 commit 414c869
Show file tree
Hide file tree
Showing 9 changed files with 222 additions and 183 deletions.
47 changes: 26 additions & 21 deletions compile/ninja/android.ninja
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ build $obj/source_bee/bpoll_linux.obj: cxx_source_bee_1 $
bee.lua/bee/net/bpoll_linux.cpp
build $obj/source_bee/endpoint.obj: cxx_source_bee_1 $
bee.lua/bee/net/endpoint.cpp
build $obj/source_bee/event.obj: cxx_source_bee_1 bee.lua/bee/net/event.cpp
build $obj/source_bee/socket.obj: cxx_source_bee_1 bee.lua/bee/net/socket.cpp
build $obj/source_bee/process_select.obj: cxx_source_bee_1 $
bee.lua/bee/subprocess/process_select.cpp
Expand Down Expand Up @@ -66,6 +67,8 @@ rule cxx_source_bee_2
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/source_bee/lua_channel.obj: cxx_source_bee_2 $
bee.lua/binding/lua_channel.cpp
build $obj/source_bee/lua_debugging.obj: cxx_source_bee_2 $
bee.lua/binding/lua_debugging.cpp
build $obj/source_bee/lua_epoll.obj: cxx_source_bee_2 $
Expand Down Expand Up @@ -96,16 +99,17 @@ rule c_source_lua
depfile = $out.d
build $obj/source_lua/linit.obj: c_source_lua bee.lua/3rd/lua/linit.c
build $obj/source_lua/onelua.obj: c_source_lua bee.lua/3rd/lua/onelua.c
rule cxx_bootstrap
rule cxx_source_bootstrap
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-fvisibility=hidden -Ibee.lua/3rd/lua -Ibee.lua -DLUA_USE_LINUX $
-DNDEBUG -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/bootstrap/main.obj: cxx_bootstrap bee.lua/bootstrap/main.cpp
build $obj/source_bootstrap/main.obj: cxx_source_bootstrap $
bee.lua/bootstrap/main.cpp
rule link_bootstrap
command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++ -Wl,-S,-x
command = $cc $in -o $out -Wl,-E -lm -ldl -lstdc++ -Wl,-S,-x
description = Link Exe $out
rule copy
command = cp -fv $in$input $out 1>/dev/null
Expand All @@ -115,36 +119,37 @@ rule test
command = $bin/bootstrap bee.lua/test/test.lua --touch $out
description = Run test.
pool = console
build $bin/bootstrap: link_bootstrap $obj/bootstrap/main.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/file.obj $obj/source_bee/luaref.obj $
$obj/source_bee/bpoll_linux.obj $obj/source_bee/endpoint.obj $
build $bin/bootstrap: link_bootstrap $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/file.obj $
$obj/source_bee/luaref.obj $obj/source_bee/bpoll_linux.obj $
$obj/source_bee/endpoint.obj $obj/source_bee/event.obj $
$obj/source_bee/socket.obj $obj/source_bee/process_select.obj $
$obj/source_bee/subprocess_posix.obj $obj/source_bee/file_handle.obj $
$obj/source_bee/file_handle_linux.obj $
$obj/source_bee/file_handle_posix.obj $obj/source_bee/path_linux.obj $
$obj/source_bee/path_posix.obj $obj/source_bee/atomic_sync.obj $
$obj/source_bee/setname.obj $obj/source_bee/simplethread_posix.obj $
$obj/source_bee/spinlock.obj $obj/source_bee/version.obj $
$obj/source_bee/lua_debugging.obj $obj/source_bee/lua_epoll.obj $
$obj/source_bee/lua_filesystem.obj $obj/source_bee/lua_filewatch.obj $
$obj/source_bee/lua_platform.obj $obj/source_bee/lua_select.obj $
$obj/source_bee/lua_serialization.obj $obj/source_bee/lua_socket.obj $
$obj/source_bee/lua_subprocess.obj $obj/source_bee/lua_thread.obj $
$obj/source_bee/lua_time.obj $obj/source_lua/linit.obj $
$obj/source_lua/onelua.obj
$obj/source_bee/lua_channel.obj $obj/source_bee/lua_debugging.obj $
$obj/source_bee/lua_epoll.obj $obj/source_bee/lua_filesystem.obj $
$obj/source_bee/lua_filewatch.obj $obj/source_bee/lua_platform.obj $
$obj/source_bee/lua_select.obj $obj/source_bee/lua_serialization.obj $
$obj/source_bee/lua_socket.obj $obj/source_bee/lua_subprocess.obj $
$obj/source_bee/lua_thread.obj $obj/source_bee/lua_time.obj $
$obj/source_lua/linit.obj $obj/source_lua/onelua.obj $
$obj/source_bootstrap/main.obj
build $bin/main.lua: copy | $bin/bootstrap
input = bee.lua/bootstrap/main.lua
build $obj/test.stamp: test bee.lua/test/glibc-version.lua $
bee.lua/test/ltest.lua bee.lua/test/shell.lua $
bee.lua/test/supported.lua bee.lua/test/test.lua $
bee.lua/test/test_epoll.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_skip.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/bootstrap copy_script
bee.lua/test/test_channel.lua bee.lua/test/test_epoll.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_skip.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/bootstrap copy_script
build luamake: copy | $bin/bootstrap
input = $bin/bootstrap
build bootstrap: phony $bin/bootstrap
Expand Down
47 changes: 26 additions & 21 deletions compile/ninja/freebsd.ninja
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ build $obj/source_bee/bpoll_bsd.obj: cxx_source_bee_1 $
bee.lua/bee/net/bpoll_bsd.cpp
build $obj/source_bee/endpoint.obj: cxx_source_bee_1 $
bee.lua/bee/net/endpoint.cpp
build $obj/source_bee/event.obj: cxx_source_bee_1 bee.lua/bee/net/event.cpp
build $obj/source_bee/socket.obj: cxx_source_bee_1 bee.lua/bee/net/socket.cpp
build $obj/source_bee/process_select.obj: cxx_source_bee_1 $
bee.lua/bee/subprocess/process_select.cpp
Expand Down Expand Up @@ -67,6 +68,8 @@ rule cxx_source_bee_2
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/source_bee/lua_channel.obj: cxx_source_bee_2 $
bee.lua/binding/lua_channel.cpp
build $obj/source_bee/lua_debugging.obj: cxx_source_bee_2 $
bee.lua/binding/lua_debugging.cpp
build $obj/source_bee/lua_epoll.obj: cxx_source_bee_2 $
Expand Down Expand Up @@ -97,16 +100,17 @@ rule c_source_lua
depfile = $out.d
build $obj/source_lua/linit.obj: c_source_lua bee.lua/3rd/lua/linit.c
build $obj/source_lua/onelua.obj: c_source_lua bee.lua/3rd/lua/onelua.c
rule cxx_bootstrap
rule cxx_source_bootstrap
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-fvisibility=hidden -Ibee.lua/3rd/lua -Ibee.lua -DLUA_USE_LINUX $
-DNDEBUG -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/bootstrap/main.obj: cxx_bootstrap bee.lua/bootstrap/main.cpp
build $obj/source_bootstrap/main.obj: cxx_source_bootstrap $
bee.lua/bootstrap/main.cpp
rule link_bootstrap
command = $cc $in -o $out -lm -Wl,-E -linotify -L/usr/local/lib -pthread $
command = $cc $in -o $out -Wl,-E -linotify -L/usr/local/lib -pthread -lm $
-Wl,--push-state,-Bstatic -lstdc++ -Wl,--pop-state -Wl,-S,-x
description = Link Exe $out
rule copy
Expand All @@ -117,36 +121,37 @@ rule test
command = $bin/bootstrap bee.lua/test/test.lua --touch $out
description = Run test.
pool = console
build $bin/bootstrap: link_bootstrap $obj/bootstrap/main.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/file.obj $obj/source_bee/luaref.obj $
$obj/source_bee/bpoll_bsd.obj $obj/source_bee/endpoint.obj $
build $bin/bootstrap: link_bootstrap $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/file.obj $
$obj/source_bee/luaref.obj $obj/source_bee/bpoll_bsd.obj $
$obj/source_bee/endpoint.obj $obj/source_bee/event.obj $
$obj/source_bee/socket.obj $obj/source_bee/process_select.obj $
$obj/source_bee/subprocess_posix.obj $obj/source_bee/file_handle.obj $
$obj/source_bee/file_handle_bsd.obj $
$obj/source_bee/file_handle_posix.obj $obj/source_bee/path_bsd.obj $
$obj/source_bee/path_posix.obj $obj/source_bee/atomic_sync.obj $
$obj/source_bee/setname.obj $obj/source_bee/simplethread_posix.obj $
$obj/source_bee/spinlock.obj $obj/source_bee/version.obj $
$obj/source_bee/lua_debugging.obj $obj/source_bee/lua_epoll.obj $
$obj/source_bee/lua_filesystem.obj $obj/source_bee/lua_filewatch.obj $
$obj/source_bee/lua_platform.obj $obj/source_bee/lua_select.obj $
$obj/source_bee/lua_serialization.obj $obj/source_bee/lua_socket.obj $
$obj/source_bee/lua_subprocess.obj $obj/source_bee/lua_thread.obj $
$obj/source_bee/lua_time.obj $obj/source_lua/linit.obj $
$obj/source_lua/onelua.obj
$obj/source_bee/lua_channel.obj $obj/source_bee/lua_debugging.obj $
$obj/source_bee/lua_epoll.obj $obj/source_bee/lua_filesystem.obj $
$obj/source_bee/lua_filewatch.obj $obj/source_bee/lua_platform.obj $
$obj/source_bee/lua_select.obj $obj/source_bee/lua_serialization.obj $
$obj/source_bee/lua_socket.obj $obj/source_bee/lua_subprocess.obj $
$obj/source_bee/lua_thread.obj $obj/source_bee/lua_time.obj $
$obj/source_lua/linit.obj $obj/source_lua/onelua.obj $
$obj/source_bootstrap/main.obj
build $bin/main.lua: copy | $bin/bootstrap
input = bee.lua/bootstrap/main.lua
build $obj/test.stamp: test bee.lua/test/glibc-version.lua $
bee.lua/test/ltest.lua bee.lua/test/shell.lua $
bee.lua/test/supported.lua bee.lua/test/test.lua $
bee.lua/test/test_epoll.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_skip.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/bootstrap copy_script
bee.lua/test/test_channel.lua bee.lua/test/test_epoll.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_skip.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/bootstrap copy_script
build luamake: copy | $bin/bootstrap
input = $bin/bootstrap
build bootstrap: phony $bin/bootstrap
Expand Down
49 changes: 27 additions & 22 deletions compile/ninja/linux.ninja
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ build $obj/source_bee/bpoll_linux.obj: cxx_source_bee_1 $
bee.lua/bee/net/bpoll_linux.cpp
build $obj/source_bee/endpoint.obj: cxx_source_bee_1 $
bee.lua/bee/net/endpoint.cpp
build $obj/source_bee/event.obj: cxx_source_bee_1 bee.lua/bee/net/event.cpp
build $obj/source_bee/socket.obj: cxx_source_bee_1 bee.lua/bee/net/socket.cpp
build $obj/source_bee/process_select.obj: cxx_source_bee_1 $
bee.lua/bee/subprocess/process_select.cpp
Expand Down Expand Up @@ -67,6 +68,8 @@ rule cxx_source_bee_2
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/source_bee/lua_channel.obj: cxx_source_bee_2 $
bee.lua/binding/lua_channel.cpp
build $obj/source_bee/lua_debugging.obj: cxx_source_bee_2 $
bee.lua/binding/lua_debugging.cpp
build $obj/source_bee/lua_epoll.obj: cxx_source_bee_2 $
Expand Down Expand Up @@ -97,17 +100,18 @@ rule c_source_lua
depfile = $out.d
build $obj/source_lua/linit.obj: c_source_lua bee.lua/3rd/lua/linit.c
build $obj/source_lua/onelua.obj: c_source_lua bee.lua/3rd/lua/onelua.c
rule cxx_bootstrap
rule cxx_source_bootstrap
command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-fvisibility=hidden -Ibee.lua/3rd/lua -Ibee.lua -DLUA_USE_LINUX $
-DNDEBUG -fPIC -o $out -c $in
description = Compile C++ $out
deps = gcc
depfile = $out.d
build $obj/bootstrap/main.obj: cxx_bootstrap bee.lua/bootstrap/main.cpp
build $obj/source_bootstrap/main.obj: cxx_source_bootstrap $
bee.lua/bootstrap/main.cpp
rule link_bootstrap
command = $cc $in -o $out -lm -ldl -Wl,-E -static-libgcc -lstdc++fs $
-pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -s
command = $cc $in -o $out -Wl,-E -static-libgcc -lstdc++fs -pthread -lm $
-ldl -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -s
description = Link Exe $out
rule copy
command = cp -fv $in$input $out 1>/dev/null
Expand All @@ -117,36 +121,37 @@ rule test
command = $bin/bootstrap bee.lua/test/test.lua --touch $out
description = Run test.
pool = console
build $bin/bootstrap: link_bootstrap $obj/bootstrap/main.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/file.obj $obj/source_bee/luaref.obj $
$obj/source_bee/bpoll_linux.obj $obj/source_bee/endpoint.obj $
build $bin/bootstrap: link_bootstrap $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/file.obj $
$obj/source_bee/luaref.obj $obj/source_bee/bpoll_linux.obj $
$obj/source_bee/endpoint.obj $obj/source_bee/event.obj $
$obj/source_bee/socket.obj $obj/source_bee/process_select.obj $
$obj/source_bee/subprocess_posix.obj $obj/source_bee/file_handle.obj $
$obj/source_bee/file_handle_linux.obj $
$obj/source_bee/file_handle_posix.obj $obj/source_bee/path_linux.obj $
$obj/source_bee/path_posix.obj $obj/source_bee/atomic_sync.obj $
$obj/source_bee/setname.obj $obj/source_bee/simplethread_posix.obj $
$obj/source_bee/spinlock.obj $obj/source_bee/version.obj $
$obj/source_bee/lua_debugging.obj $obj/source_bee/lua_epoll.obj $
$obj/source_bee/lua_filesystem.obj $obj/source_bee/lua_filewatch.obj $
$obj/source_bee/lua_platform.obj $obj/source_bee/lua_select.obj $
$obj/source_bee/lua_serialization.obj $obj/source_bee/lua_socket.obj $
$obj/source_bee/lua_subprocess.obj $obj/source_bee/lua_thread.obj $
$obj/source_bee/lua_time.obj $obj/source_lua/linit.obj $
$obj/source_lua/onelua.obj
$obj/source_bee/lua_channel.obj $obj/source_bee/lua_debugging.obj $
$obj/source_bee/lua_epoll.obj $obj/source_bee/lua_filesystem.obj $
$obj/source_bee/lua_filewatch.obj $obj/source_bee/lua_platform.obj $
$obj/source_bee/lua_select.obj $obj/source_bee/lua_serialization.obj $
$obj/source_bee/lua_socket.obj $obj/source_bee/lua_subprocess.obj $
$obj/source_bee/lua_thread.obj $obj/source_bee/lua_time.obj $
$obj/source_lua/linit.obj $obj/source_lua/onelua.obj $
$obj/source_bootstrap/main.obj
build $bin/main.lua: copy | $bin/bootstrap
input = bee.lua/bootstrap/main.lua
build $obj/test.stamp: test bee.lua/test/glibc-version.lua $
bee.lua/test/ltest.lua bee.lua/test/shell.lua $
bee.lua/test/supported.lua bee.lua/test/test.lua $
bee.lua/test/test_epoll.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_skip.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/bootstrap copy_script
bee.lua/test/test_channel.lua bee.lua/test/test_epoll.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_skip.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/bootstrap copy_script
build luamake: copy | $bin/bootstrap
input = $bin/bootstrap
build bootstrap: phony $bin/bootstrap
Expand Down
Loading

0 comments on commit 414c869

Please sign in to comment.