mirror of
https://github.com/bolucat/Archive.git
synced 2025-09-26 20:21:35 +08:00
Update On Sat Oct 19 20:34:39 CEST 2024
This commit is contained in:
46
naiveproxy/.github/workflows/build.yml
vendored
46
naiveproxy/.github/workflows/build.yml
vendored
@@ -10,7 +10,7 @@ defaults:
|
||||
shell: bash
|
||||
working-directory: src
|
||||
env:
|
||||
CACHE_EPOCH: 1
|
||||
CACHE_EPOCH: 4
|
||||
CCACHE_MAXSIZE: 200M
|
||||
CCACHE_MAXFILES: 0
|
||||
SCCACHE_CACHE_SIZE: 200M
|
||||
@@ -386,7 +386,7 @@ jobs:
|
||||
openwrt: "target=x86 subtarget=64"
|
||||
target_cpu: x64
|
||||
- arch: x86
|
||||
openwrt: "target=x86 subtarget=generic"
|
||||
openwrt: "target=x86 subtarget=geode"
|
||||
target_cpu: x86
|
||||
- arch: aarch64_cortex-a53
|
||||
openwrt: "target=sunxi subtarget=cortexa53"
|
||||
@@ -395,7 +395,7 @@ jobs:
|
||||
- arch: aarch64_cortex-a53-static
|
||||
openwrt: "target=sunxi subtarget=cortexa53"
|
||||
target_cpu: arm64
|
||||
extra: 'arm_cpu="cortex-a53" build_static=true no_madvise_syscall=true'
|
||||
extra: 'arm_cpu="cortex-a53" build_static=true use_allocator_shim=false use_partition_alloc=false'
|
||||
- arch: aarch64_cortex-a72
|
||||
openwrt: "target=mvebu subtarget=cortexa72"
|
||||
target_cpu: arm64
|
||||
@@ -403,16 +403,16 @@ jobs:
|
||||
- arch: aarch64_cortex-a72-static
|
||||
openwrt: "target=mvebu subtarget=cortexa72"
|
||||
target_cpu: arm64
|
||||
extra: 'arm_cpu="cortex-a72" build_static=true no_madvise_syscall=true'
|
||||
extra: 'arm_cpu="cortex-a72" build_static=true use_allocator_shim=false use_partition_alloc=false'
|
||||
- arch: aarch64_generic
|
||||
openwrt: "target=rockchip subtarget=armv8"
|
||||
openwrt: "target=layerscape subtarget=armv8_64b"
|
||||
target_cpu: arm64
|
||||
- arch: aarch64_generic-static
|
||||
openwrt: "target=rockchip subtarget=armv8"
|
||||
openwrt: "target=layerscape subtarget=armv8_64b"
|
||||
target_cpu: arm64
|
||||
extra: "build_static=true no_madvise_syscall=true"
|
||||
extra: "build_static=true use_allocator_shim=false use_partition_alloc=false"
|
||||
- arch: arm_arm1176jzf-s_vfp
|
||||
openwrt: "target=bcm27xx subtarget=bcm2708"
|
||||
openwrt: "target=brcm2708 subtarget=bcm2708"
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="arm1176jzf-s" arm_fpu="vfp" arm_float_abi="hard" arm_use_neon=false arm_use_thumb=false'
|
||||
- arch: arm_arm926ej-s
|
||||
@@ -420,29 +420,33 @@ jobs:
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="arm926ej-s" arm_float_abi="soft" arm_use_neon=false arm_use_thumb=false'
|
||||
- arch: arm_cortex-a15_neon-vfpv4
|
||||
openwrt: "target=armsr subtarget=armv7"
|
||||
openwrt: "target=ipq806x subtarget=generic"
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="cortex-a15" arm_fpu="neon-vfpv4" arm_float_abi="hard" arm_use_neon=true'
|
||||
- arch: arm_cortex-a5_vfpv4
|
||||
openwrt: "target=at91 subtarget=sama5"
|
||||
openwrt: "target=at91 subtarget=sama5d3"
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="cortex-a5" arm_fpu="vfpv4" arm_float_abi="hard" arm_use_neon=false'
|
||||
- arch: arm_cortex-a7
|
||||
openwrt: "target=mediatek subtarget=mt7629"
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_float_abi="soft" arm_use_neon=false'
|
||||
openwrt_release: '21.02.0'
|
||||
openwrt_gcc_ver: '8.4.0'
|
||||
- arch: arm_cortex-a7_neon-vfpv4
|
||||
openwrt: "target=sunxi subtarget=cortexa7"
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_fpu="neon-vfpv4" arm_float_abi="hard" arm_use_neon=true'
|
||||
- arch: arm_cortex-a7_neon-vfpv4-static
|
||||
openwrt: "target=sunxi subtarget=cortexa7"
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_fpu="neon-vfpv4" arm_float_abi="hard" arm_use_neon=true build_static=true use_allocator_shim=false use_partition_alloc=false'
|
||||
- arch: arm_cortex-a7_vfpv4
|
||||
openwrt: "target=at91 subtarget=sama7"
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_fpu="vfpv4" arm_float_abi="hard" arm_use_neon=false'
|
||||
- arch: arm_cortex-a7_neon-vfpv4-static
|
||||
openwrt: "target=sunxi subtarget=cortexa7"
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_fpu="neon-vfpv4" arm_float_abi="hard" arm_use_neon=true build_static=true no_madvise_syscall=true'
|
||||
openwrt_release: '22.03.0'
|
||||
openwrt_gcc_ver: '11.2.0'
|
||||
- arch: arm_cortex-a8_vfpv3
|
||||
openwrt: "target=sunxi subtarget=cortexa8"
|
||||
target_cpu: arm
|
||||
@@ -454,13 +458,13 @@ jobs:
|
||||
- arch: arm_cortex-a9-static
|
||||
openwrt: "target=bcm53xx subtarget=generic"
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="cortex-a9" arm_float_abi="soft" arm_use_neon=false build_static=true no_madvise_syscall=true'
|
||||
extra: 'arm_version=0 arm_cpu="cortex-a9" arm_float_abi="soft" arm_use_neon=false build_static=true use_allocator_shim=false use_partition_alloc=false'
|
||||
- arch: arm_cortex-a9_neon
|
||||
openwrt: "target=zynq subtarget=generic"
|
||||
openwrt: "target=imx6 subtarget=generic"
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="cortex-a9" arm_fpu="neon" arm_float_abi="hard" arm_use_neon=true'
|
||||
- arch: arm_cortex-a9_vfpv3-d16
|
||||
openwrt: "target=tegra subtarget=generic"
|
||||
openwrt: "target=mvebu subtarget=cortexa9"
|
||||
target_cpu: arm
|
||||
extra: 'arm_version=0 arm_cpu="cortex-a9" arm_fpu="vfpv3-d16" arm_float_abi="hard" arm_use_neon=false'
|
||||
- arch: arm_mpcore
|
||||
@@ -478,17 +482,19 @@ jobs:
|
||||
- arch: mipsel_24kc-static
|
||||
openwrt: "target=ramips subtarget=rt305x"
|
||||
target_cpu: mipsel
|
||||
extra: 'mips_arch_variant="r2" mips_float_abi="soft" build_static=true no_madvise_syscall=true'
|
||||
extra: 'mips_arch_variant="r2" mips_float_abi="soft" build_static=true use_allocator_shim=false use_partition_alloc=false'
|
||||
- arch: mipsel_mips32
|
||||
openwrt: "target=bcm47xx subtarget=generic"
|
||||
openwrt: "target=brcm47xx subtarget=legacy"
|
||||
target_cpu: mipsel
|
||||
extra: 'mips_arch_variant="r1" mips_float_abi="soft"'
|
||||
- arch: riscv64
|
||||
openwrt: "target=sifiveu subtarget=generic"
|
||||
target_cpu: riscv64
|
||||
openwrt_release: '23.05.0'
|
||||
openwrt_gcc_ver: '12.3.0'
|
||||
env:
|
||||
EXTRA_FLAGS: target_cpu="${{ matrix.target_cpu }}" target_os="openwrt" ${{ matrix.extra }}
|
||||
OPENWRT_FLAGS: arch=${{ matrix.arch }} release=23.05.0 gcc_ver=12.3.0 ${{ matrix.openwrt }}
|
||||
OPENWRT_FLAGS: arch=${{ matrix.arch }} release=${{ matrix.openwrt_release || '18.06.0' }} gcc_ver=${{ matrix.openwrt_gcc_ver || '7.3.0' }} ${{ matrix.openwrt }}
|
||||
BUNDLE: naiveproxy-${{ github.event.release.tag_name }}-${{ github.job }}-${{ matrix.arch }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@@ -420,9 +420,8 @@ void DiscardSystemPagesInternal(uintptr_t address, size_t length) {
|
||||
}
|
||||
PA_PCHECK(ret == 0);
|
||||
#elif defined(NO_MADVISE_SYSCALL)
|
||||
// The kernel may be missing madvise support, but
|
||||
// if the kernel does support it, should call it to avoid memory leaking.
|
||||
static_cast<void>(madvise(ptr, length, MADV_DONTNEED));
|
||||
static_cast<void>(ptr);
|
||||
static_cast<void>(length);
|
||||
#else // PA_BUILDFLAG(IS_APPLE)
|
||||
// We have experimented with other flags, but with suboptimal results.
|
||||
//
|
||||
|
@@ -15,16 +15,32 @@ arm_*) abi=musl_eabi;;
|
||||
*) abi=musl;;
|
||||
esac
|
||||
|
||||
if [ "$subtarget" ]; then
|
||||
SDK_PATH=openwrt-toolchain-$release-$target-${subtarget}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
||||
major=${release%%.*}
|
||||
if [ "$major" -ge 22 ]; then
|
||||
path_suffix=toolchain
|
||||
else
|
||||
subtarget='generic'
|
||||
SDK_PATH=openwrt-toolchain-$release-${target}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
||||
path_suffix=sdk
|
||||
fi
|
||||
|
||||
if [ ! "$subtarget" ]; then
|
||||
subtarget=generic
|
||||
fi
|
||||
|
||||
if [ "$subtarget" != generic -o "$major" -ge 22 ]; then
|
||||
SDK_PATH=openwrt-$path_suffix-$release-$target-${subtarget}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
||||
else
|
||||
SDK_PATH=openwrt-$path_suffix-$release-${target}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
||||
fi
|
||||
SDK_URL=https://downloads.openwrt.org/releases/$release/targets/$target/$subtarget/$SDK_PATH.tar.xz
|
||||
rm -rf $SDK_PATH
|
||||
curl $SDK_URL | tar xJf -
|
||||
|
||||
if [ "$major" -ge 22 ]; then
|
||||
cd $SDK_PATH
|
||||
else
|
||||
cd $SDK_PATH/staging_dir
|
||||
fi
|
||||
|
||||
full_root=toolchain-*_gcc-${gcc_ver}_${abi}
|
||||
cat >include.txt <<EOF
|
||||
./include
|
||||
|
@@ -10,9 +10,6 @@
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "base/allocator/allocator_check.h"
|
||||
#include "base/allocator/partition_alloc_support.h"
|
||||
#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h"
|
||||
#include "base/at_exit.h"
|
||||
#include "base/check.h"
|
||||
#include "base/command_line.h"
|
||||
@@ -82,6 +79,12 @@
|
||||
#include "base/apple/scoped_nsautorelease_pool.h"
|
||||
#endif
|
||||
|
||||
#if PA_BUILDFLAG(USE_PARTITION_ALLOC)
|
||||
#include "base/allocator/allocator_check.h"
|
||||
#include "base/allocator/partition_alloc_support.h"
|
||||
#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr int kListenBackLog = 512;
|
||||
@@ -305,9 +308,12 @@ int main(int argc, char* argv[]) {
|
||||
// content/app/content_main.cc: RunContentProcess()
|
||||
// content/app/content_main_runner_impl.cc: Initialize()
|
||||
base::AtExitManager exit_manager;
|
||||
|
||||
#if PA_BUILDFLAG(USE_PARTITION_ALLOC)
|
||||
std::string process_type = "";
|
||||
base::allocator::PartitionAllocSupport::Get()->ReconfigureEarlyish(
|
||||
process_type);
|
||||
#endif
|
||||
|
||||
// content/app/content_main.cc: RunContentProcess()
|
||||
// content/app/content_main_runner_impl.cc: Initialize()
|
||||
@@ -315,21 +321,27 @@ int main(int argc, char* argv[]) {
|
||||
// with PartitionAlloc on most platforms) smoke-tests that the overriding
|
||||
// logic is working correctly. If not causes a hard crash, as its unexpected
|
||||
// absence has security implications.
|
||||
#if PA_BUILDFLAG(USE_PARTITION_ALLOC)
|
||||
CHECK(base::allocator::IsAllocatorInitialized());
|
||||
#endif
|
||||
|
||||
// content/app/content_main.cc: RunContentProcess()
|
||||
// content/app/content_main_runner_impl.cc: Run()
|
||||
base::FeatureList::InitInstance("PartitionConnectionsByNetworkIsolationKey",
|
||||
std::string());
|
||||
|
||||
#if PA_BUILDFLAG(USE_PARTITION_ALLOC)
|
||||
base::allocator::PartitionAllocSupport::Get()
|
||||
->ReconfigureAfterFeatureListInit(/*process_type=*/"");
|
||||
#endif
|
||||
|
||||
base::SingleThreadTaskExecutor io_task_executor(base::MessagePumpType::IO);
|
||||
base::ThreadPoolInstance::CreateAndStartWithDefaultParams("naive");
|
||||
|
||||
#if PA_BUILDFLAG(USE_PARTITION_ALLOC)
|
||||
base::allocator::PartitionAllocSupport::Get()->ReconfigureAfterTaskRunnerInit(
|
||||
process_type);
|
||||
#endif
|
||||
|
||||
url::AddStandardScheme("quic",
|
||||
url::SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION);
|
||||
|
Reference in New Issue
Block a user