Skip to content

Commit

Permalink
Continue implementation work on Orchid nanokernel.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurik committed May 15, 2024
1 parent 5b11e25 commit 4b4ff12
Show file tree
Hide file tree
Showing 343 changed files with 877 additions and 1,312 deletions.
81 changes: 39 additions & 42 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
path = app-shared/flutter
url = https://github.com/flutter/flutter.git
[submodule "boost"]
path = p2p/boost
path = lib-shared/boost
url = https://github.com/boostorg/boost.git
[submodule "cppcoro"]
path = p2p/cppcoro
path = lib-shared/cppcoro
url = https://github.com/lewissbaker/cppcoro.git
[submodule "jsoncpp"]
path = p2p/jsoncpp
path = lib-shared/jsoncpp
url = https://github.com/open-source-parsers/jsoncpp.git
[submodule "abseil-cpp"]
path = min-webrtc/abseil-cpp
path = lib-shared/abseil-cpp
url = https://github.com/abseil/abseil-cpp.git
[submodule "libsrtp"]
path = min-webrtc/libsrtp
Expand All @@ -20,10 +20,10 @@
path = min-webrtc/webrtc
url = https://webrtc.googlesource.com/src
[submodule "openvpn3"]
path = p2p/openvpn3
path = lib-protocol/openvpn3
url = https://github.com/OpenVPN/openvpn3.git
[submodule "lz4"]
path = p2p/lz4
path = lib-protocol/lz4
url = https://github.com/lz4/lz4.git
[submodule "openzeppelin-solidity"]
path = openzeppelin-solidity
Expand All @@ -35,25 +35,25 @@
path = vpn-shared/libevent
url = https://github.com/libevent/libevent.git
[submodule "lwip"]
path = p2p/lwip
path = lib-protocol/lwip
url = https://git.savannah.nongnu.org/git/lwip.git
[submodule "boringtun"]
path = p2p/boringtun
path = lib-protocol/boringtun
url = https://github.com/cloudflare/boringtun.git
[submodule "tor"]
path = vpn-shared/tor
url = https://git.torproject.org/tor.git
[submodule "libutp"]
path = p2p/libutp
path = lib-protocol/libutp
url = https://github.com/bittorrent/libutp.git
[submodule "flutter-desktop-embedding"]
path = app-shared/flutter-desktop-embedding
url = https://github.com/google/flutter-desktop-embedding
[submodule "url"]
path = p2p/url
path = lib-shared/url
url = https://github.com/cpp-netlib/url
[submodule "secp256k1"]
path = p2p/secp256k1
path = lib-shared/secp256k1
url = https://github.com/bitcoin-core/secp256k1.git
[submodule "openssl"]
path = min-openssl/openssl
Expand All @@ -65,16 +65,16 @@
path = min-zlib/libz
url = https://chromium.googlesource.com/chromium/src/third_party/zlib.git
[submodule "eEVM"]
path = p2p/eEVM
path = lib-shared/eEVM
url = https://github.com/microsoft/eEVM.git
[submodule "tap-windows6"]
path = p2p/tap-windows6
path = lib-protocol/tap-windows6
url = https://github.com/OpenVPN/tap-windows6
[submodule "sqlite"]
path = p2p/sqlite
path = lib-shared/sqlite
url = https://github.com/mackyle/sqlite.git
[submodule "SPCDNS"]
path = p2p/SPCDNS
path = lib-protocol/SPCDNS
url = https://github.com/spc476/SPCDNS
[submodule "wireshark"]
path = min-wireshark/wireshark
Expand All @@ -94,44 +94,35 @@
[submodule "gnulib"]
path = min-glib/gnulib
url = https://git.savannah.gnu.org/git/gnulib.git
[submodule "libcxxabi"]
path = env/libcxxabi
url = https://github.com/llvm-mirror/libcxxabi.git
[submodule "libcxx"]
path = env/libcxx
url = https://github.com/llvm-mirror/libcxx.git
[submodule "pkg-config"]
path = env/pkg-config
url = https://gitlab.freedesktop.org/pkg-config/pkg-config.git
[submodule "quickjs"]
path = vpn-shared/quickjs
url = https://github.com/bellard/quickjs.git
[submodule "intx"]
path = p2p/intx
path = lib-shared/intx
url = https://github.com/chfast/intx.git
[submodule "expected"]
path = p2p/expected
path = lib-shared/expected
url = https://github.com/TartanLlama/expected.git
[submodule "curl"]
path = p2p/curl
path = lib-protocol/curl
url = https://github.com/curl/curl.git
[submodule "challenge-bypass-ristretto-ffi"]
path = p2p/challenge-bypass-ristretto-ffi
path = lib-protocol/challenge-bypass-ristretto-ffi
url = https://github.com/brave-intl/challenge-bypass-ristretto-ffi.git
[submodule "icu"]
path = min-icu4c/icu
url = https://github.com/unicode-org/icu.git
[submodule "googletest"]
path = min-zlib/googletest
url = https://chromium.googlesource.com/external/github.com/google/googletest.git
[submodule "v8"]
path = min-v8/v8
url = https://chromium.googlesource.com/v8/v8
[submodule "trace_event"]
path = min-v8/trace_event
url = https://chromium.googlesource.com/chromium/src/base/trace_event/common.git
[submodule "protobuf"]
path = p2p/protobuf
path = lib-protocol/protobuf
url = https://chromium.googlesource.com/external/github.com/google/protobuf
[submodule "jinja2"]
path = min-v8/jinja2
Expand All @@ -140,19 +131,19 @@
path = min-v8/markupsafe
url = https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git
[submodule "fmt"]
path = p2p/fmt
path = lib-shared/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "leveldb"]
path = tst-explore/leveldb
url = https://github.com/google/leveldb.git
[submodule "c-ares"]
path = p2p/c-ares
path = lib-protocol/c-ares
url = https://github.com/c-ares/c-ares.git
[submodule "SHA3IUF"]
path = p2p/SHA3IUF
path = lib-shared/SHA3IUF
url = https://github.com/brainhub/SHA3IUF.git
[submodule "cpp-jwt"]
path = p2p/cpp-jwt
path = lib-protocol/cpp-jwt
url = https://github.com/arun11299/cpp-jwt.git
[submodule "cairo"]
path = min-cairo/cairo
Expand All @@ -164,7 +155,7 @@
path = min-cairo/pixman
url = https://gitlab.freedesktop.org/pixman/pixman.git
[submodule "chains"]
path = p2p/chains
path = lib-protocol/chains
url = https://github.com/ethereum-lists/chains.git
[submodule "engine"]
path = app-shared/engine
Expand All @@ -173,16 +164,16 @@
path = min-krypton/vpn-libraries
url = https://github.com/google/vpn-libraries.git
[submodule "compile-time-regular-expressions"]
path = p2p/ctre
path = lib-shared/ctre
url = https://github.com/hanickadot/compile-time-regular-expressions.git
[submodule "trezor-common"]
path = p2p/trezor-common
path = lib-protocol/trezor-common
url = https://github.com/trezor/trezor-common.git
[submodule "bech32"]
path = p2p/bech32
path = lib-shared/bech32
url = https://github.com/sipa/bech32.git
[submodule "pugixml"]
path = p2p/pugixml
path = lib-protocol/pugixml
url = https://github.com/zeux/pugixml.git
[submodule "mediasoup"]
path = eng-mediasoup/mediasoup
Expand All @@ -197,7 +188,7 @@
path = min-webrtc/crc32c
url = https://github.com/google/crc32c.git
[submodule "snappy"]
path = p2p/snappy
path = lib-protocol/snappy
url = https://github.com/google/snappy.git
[submodule "pcre2"]
path = min-pcre2/pcre2
Expand Down Expand Up @@ -226,6 +217,12 @@
[submodule "mingw-w64"]
path = env/mingw-w64
url = https://git.code.sf.net/p/mingw-w64/mingw-w64
[submodule "base"]
path = min-v8/base
url = https://chromium.googlesource.com/chromium/src/base
[submodule "FP16"]
path = min-v8/FP16
url = https://github.com/Maratyszcza/FP16.git
[submodule "boringssl"]
path = min-boringssl/boringssl
url = https://boringssl.googlesource.com/boringssl
[submodule "llvm-project"]
path = env/llvm-project
url = https://github.com/llvm/llvm-project.git
2 changes: 1 addition & 1 deletion app-ios/env
2 changes: 1 addition & 1 deletion app-macos/env
3 changes: 3 additions & 0 deletions app-windows/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ source += $(wildcard $(pwd)/source/*.rc)

$(call include,shared/target-win.mk)

# XXX: due to flutter window_size plugin
cflags += -Wno-deprecated-declarations

include env/output.mk

$(output)/package/$(name)$(exe): $(patsubst %,$(output)/$(machine)/%,$(object) $(linked))
Expand Down
2 changes: 1 addition & 1 deletion cli-shared/env
4 changes: 0 additions & 4 deletions p2p/source/android.cpp → env/android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
/* }}} */


#ifdef __ANDROID__

// some rust projects depend indirectly on the nix crate
// and rust object files have leaky translation units :(
// so linking the archive tries to pull in these symbols
Expand All @@ -35,5 +33,3 @@ extern "C" int getgrgid_r(gid_t gid, struct group *grp, char *buffer, size_t buf
extern "C" int getgrnam_r(const char *name, struct group *grp, char *buffer, size_t bufsize, struct group **result) {
orc_insist(false);
}

#endif
2 changes: 1 addition & 1 deletion env/docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
rm -rf out-dkr
exec docker run --platform linux/amd64 -i --rm -v "$(dirname "${PWD}"):/mnt" ubuntu:focal \
exec docker run --platform linux/amd64 -i --rm -v "$(dirname "${PWD}"):/mnt" ubuntu:jammy \
/mnt/env/setup-dkr.sh make -C "${PWD##*/}" debug=crossndk output=out-dkr "$@"
3 changes: 3 additions & 0 deletions env/extra/__config_site
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define _LIBCPP_ABI_VERSION 2
#define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
1 change: 0 additions & 1 deletion env/libcxx
Submodule libcxx deleted from 2076f5
1 change: 1 addition & 0 deletions env/libcxx
1 change: 0 additions & 1 deletion env/libcxxabi
Submodule libcxxabi deleted from a88633
1 change: 1 addition & 0 deletions env/libcxxabi
1 change: 1 addition & 0 deletions env/llvm-project
Submodule llvm-project added at c4c5e7
23 changes: 1 addition & 22 deletions env/lnx-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,5 @@ apt-get -y install \
bison flex gperf \
gettext groff texinfo \
autoconf autoconf-archive automake \
libtool ninja-build pkg-config \
libtool meson ninja-build pkg-config \
qemu-system-{x86,arm} \

function usable() {
# Ubuntu bionic ships meson 0.45, which is too old to build glib
# XXX: consider checking for meson 0.52 (it broke cross linking)

# Ubuntu focal ships meson 0.53, which is still incompatible with the lld that comes in the r22 Android NDK
# meson passes --allow-shlib-undefined to lld, which only recently added it https://reviews.llvm.org/D57385
# this bug is now fixed in meson, but also not until recently https://github.com/mesonbuild/meson/pull/5912

for version in $(apt-cache show meson | sed -e '/^Version: */!d;s///'); do
if dpkg --compare-versions "${version}" ">=" "0.54.0"; then
return
fi
done
false; }

if usable; then
apt-get -y install meson
else
pip3 install meson
fi
3 changes: 1 addition & 2 deletions env/submodule.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
set -e
# XXX: flutter needs deep for an unknown reason; maybe this can be fixed?
# XXX: googletest broke recently and doesn't even support HEAD and I sigh
# XXX: the other repositories need uploadpack.allowReachableSHA1InWant :(
git submodule update --init --recursive "$@" -- app-shared/flutter min-cairo/libpng min-glib/{gnulib,libiconv} min-zlib/googletest p2p/lwip srv-worker/glibc vpn-shared/{libssh,tor}
git submodule update --init --recursive "$@" -- app-shared/flutter min-cairo/libpng min-glib/{gnulib,libiconv} lib-protocol/lwip srv-worker/glibc vpn-shared/{libssh,tor}
git submodule update --init --recursive "$@" --depth 1
2 changes: 2 additions & 0 deletions env/target-and.mk
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,5 @@ lflags += -nostdlib++ -lc++abi
lflags += -lm -llog

wflags += -L$(CURDIR)/env/android

source += env/android.cpp
24 changes: 15 additions & 9 deletions env/target-cxx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@
# }}}


pwd/env := $(pwd)

xflags += -nostdinc++
xflags += -isystem $(CURDIR)/$(pwd)/libcxx/include
xflags += -isystem $(CURDIR)/$(pwd)/libcxxabi/include
xflags += -isystem $(CURDIR)/$(pwd)/extra

cflags/$(pwd)/libcxx/ += -I$(CURDIR)/$(pwd/env)/libcxx/src
cflags/$(pwd)/libcxxabi/ += -I$(CURDIR)/$(pwd/env)/libcxx/src

source += $(wildcard $(pwd)/libcxx/src/*.cpp)
source += $(wildcard $(pwd)/libcxx/src/ryu/*.cpp)
qflags += -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS

cflags/$(pwd)/libcxx/ += -D_LIBCPP_BUILDING_LIBRARY=
Expand All @@ -26,15 +33,14 @@ else
cflags/$(pwd)/libcxx/ += -D__GLIBCXX__
endif

cflags/$(pwd)/libcxx/src/exception.cpp += -Wno-\#warnings
cflags/$(pwd)/libcxxabi/src/cxa_thread_atexit.cpp += -Wno-pointer-bool-conversion
source += $(pwd)/libcxxabi/src/abort_message.cpp
source += $(pwd)/libcxxabi/src/cxa_demangle.cpp
source += $(pwd)/libcxxabi/src/cxa_guard.cpp
source += $(pwd)/libcxxabi/src/cxa_virtual.cpp

source += env/libcxxabi/src/abort_message.cpp
source += env/libcxxabi/src/cxa_demangle.cpp
source += env/libcxxabi/src/cxa_guard.cpp
source += env/libcxxabi/src/cxa_virtual.cpp

ifneq ($(target),win)
ifeq ($(target),win)
source += $(pwd)/libcxx/src/support/win32/thread_win32.cpp
else
# this requires _LIBCXXABI_WEAK to be defined
source += env/libcxxabi/src/cxa_thread_atexit.cpp
source += $(pwd)/libcxxabi/src/cxa_thread_atexit.cpp
endif
7 changes: 6 additions & 1 deletion env/target-lld.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
include $(pwd)/target-gnu.mk

wflags += -fuse-ld=lld
lflags += -Wl,--icf=all
lflags += -Wl,--error-limit=0

ifeq ($(filter nostrip,$(debug)),)
lflags += -Wl,--icf=all
else
lflags += -Wl,--icf=none
endif

export LLD_VERSION := Linker: LLD
4 changes: 0 additions & 4 deletions env/target-lnx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,8 @@ endef
$(each)

ifeq ($(distro),)
ifneq ($(centos/$(machine)),)
distro := centos6 $(machine) $(centos/$(machine))
else
distro := ubuntu bionic 7
endif
endif

sysroot += $(output)/sysroot

Expand Down
1 change: 1 addition & 0 deletions eth-sender/lib
Loading

0 comments on commit 4b4ff12

Please sign in to comment.