update 2023-09-17 03:49:00
This commit is contained in:
parent
49d2c846ae
commit
c91be47e1d
|
@ -5,12 +5,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=naiveproxy
|
||||
PKG_VERSION:=116.0.5845.92-2
|
||||
PKG_VERSION:=117.0.5938.44-1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/klzgrad/naiveproxy/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=1e027730e9abdb9cf02eb4e0b831072f437c66647a9df4389dbecd7364614592
|
||||
PKG_HASH:=42bc36a068711bc0752930c201371495bd39279caed41e6ff4097e2b05d1844c
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
@ -19,6 +19,7 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
|||
PKG_BUILD_DEPENDS:=gn/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
ifneq ($(CONFIG_CPU_TYPE)," ")
|
||||
CPU_TYPE:=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE)))
|
||||
|
@ -55,22 +56,22 @@ ifneq ($(CONFIG_CCACHE),)
|
|||
export naive_ccache_flags=cc_wrapper="$(CCACHE)"
|
||||
endif
|
||||
|
||||
CLANG_VER:=17-init-12166-g7586aeab-3
|
||||
CLANG_VER:=18-init-1174-g2532b68f-1
|
||||
CLANG_FILE:=clang-llvmorg-$(CLANG_VER).tgz
|
||||
define Download/CLANG
|
||||
URL:=https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64
|
||||
URL_FILE:=$(CLANG_FILE)
|
||||
FILE:=$(CLANG_FILE)
|
||||
HASH:=a3c744bef3e76c985b51f55f2c864f9bd10ac777b88a65a31d6cd85b6dda816b
|
||||
HASH:=1165d4130ae40efdb48427a6098c7cce393c09e00dc1feda9c91bdcf43a77eaf
|
||||
endef
|
||||
|
||||
PGO_VER:=5845-1691722785-bee99d0dc25d78f4193491ad30759d668e3c9311
|
||||
PGO_VER:=5938-1693935896-daaeff75cfda3bcc13276975ff4ba18cb55c14c5
|
||||
PGO_FILE:=chrome-linux-$(PGO_VER).profdata
|
||||
define Download/PGO_PROF
|
||||
URL:=https://storage.googleapis.com/chromium-optimization-profiles/pgo_profiles
|
||||
URL_FILE:=$(PGO_FILE)
|
||||
FILE:=$(PGO_FILE)
|
||||
HASH:=e6693bb2d9257a1c0d56c8bbd7713387a47e8d0bea44a5946699ffb393911cb4
|
||||
HASH:=f4048d5a96163b585f5e8495d5cf48f0109492251e8e602c4223454c64f054fe
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
|
|
|
@ -0,0 +1,207 @@
|
|||
--- a/src/build.sh
|
||||
+++ b/src/build.sh
|
||||
@@ -49,6 +49,9 @@ flags="$flags"'
|
||||
enable_reporting=false
|
||||
include_transport_security_state_preload_list=false
|
||||
use_nss_certs=false
|
||||
+
|
||||
+ enable_backup_ref_ptr_support=false
|
||||
+ enable_dangling_raw_ptr_checks=false
|
||||
'
|
||||
|
||||
if [ "$WITH_SYSROOT" ]; then
|
||||
--- a/src/net/tools/naive/naive_proxy_bin.cc
|
||||
+++ b/src/net/tools/naive/naive_proxy_bin.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
+#include "base/allocator/partition_alloc_support.h"
|
||||
#include "base/at_exit.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/feature_list.h"
|
||||
@@ -145,7 +146,9 @@ class MultipleListenCollector : public b
|
||||
}
|
||||
}
|
||||
|
||||
- const std::vector<std::string>& GetAllValues() const { return all_values_; }
|
||||
+ const std::vector<std::string>& GetAllValues() const {
|
||||
+ return all_values_;
|
||||
+ }
|
||||
|
||||
private:
|
||||
std::vector<std::string> all_values_;
|
||||
@@ -539,7 +542,8 @@ int main(int argc, char* argv[]) {
|
||||
net::HttpNetworkSession::NORMAL_SOCKET_POOL,
|
||||
kDefaultMaxSocketsPerGroup * kExpectedMaxUsers);
|
||||
|
||||
- naive_partition_alloc_support::ReconfigureAfterFeatureListInit();
|
||||
+ base::allocator::PartitionAllocSupport::Get()
|
||||
+ ->ReconfigureAfterFeatureListInit(/*process_type=*/"");
|
||||
|
||||
#if BUILDFLAG(IS_APPLE)
|
||||
base::mac::ScopedNSAutoreleasePool pool;
|
||||
@@ -576,7 +580,8 @@ int main(int argc, char* argv[]) {
|
||||
base::SingleThreadTaskExecutor io_task_executor(base::MessagePumpType::IO);
|
||||
base::ThreadPoolInstance::CreateAndStartWithDefaultParams("naive");
|
||||
|
||||
- naive_partition_alloc_support::ReconfigureAfterTaskRunnerInit();
|
||||
+ base::allocator::PartitionAllocSupport::Get()
|
||||
+ ->ReconfigureAfterTaskRunnerInit(/*process_type=*/"");
|
||||
|
||||
if (!params.ssl_key_path.empty()) {
|
||||
net::SSLClientSocket::SetSSLKeyLogger(
|
||||
--- a/src/net/tools/naive/partition_alloc_support.cc
|
||||
+++ b/src/net/tools/naive/partition_alloc_support.cc
|
||||
@@ -5,30 +5,13 @@
|
||||
|
||||
#include "net/tools/naive/partition_alloc_support.h"
|
||||
|
||||
-#include <string>
|
||||
-
|
||||
#include "base/allocator/allocator_check.h"
|
||||
-#include "base/allocator/buildflags.h"
|
||||
-#include "base/allocator/partition_alloc_features.h"
|
||||
#include "base/allocator/partition_alloc_support.h"
|
||||
-#include "base/allocator/partition_allocator/partition_alloc_config.h"
|
||||
#include "base/allocator/partition_allocator/shim/allocator_shim.h"
|
||||
-#include "base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.h"
|
||||
-#include "base/allocator/partition_allocator/thread_cache.h"
|
||||
-#include "base/feature_list.h"
|
||||
+#include "base/check.h"
|
||||
#include "base/process/memory.h"
|
||||
-#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
-#include "base/system/sys_info.h"
|
||||
-#endif
|
||||
-
|
||||
-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
-#include "base/allocator/partition_allocator/memory_reclaimer.h"
|
||||
-#include "base/task/single_thread_task_runner.h"
|
||||
-#endif
|
||||
-
|
||||
#if BUILDFLAG(IS_APPLE)
|
||||
#include "base/allocator/early_zone_registration_mac.h"
|
||||
#endif
|
||||
@@ -62,9 +45,8 @@ void ReconfigureEarly() {
|
||||
// ReconfigureEarlyish():
|
||||
// These initializations are only relevant for PartitionAlloc-Everywhere
|
||||
// builds.
|
||||
-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
- allocator_shim::EnablePartitionAllocMemoryReclaimer();
|
||||
-#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
+ base::allocator::PartitionAllocSupport::Get()->ReconfigureEarlyish(
|
||||
+ /*process_type=*/"");
|
||||
|
||||
// content/app/content_main.cc: RunContentProcess()
|
||||
// content/app/content_main_runner_impl.cc: Initialize()
|
||||
@@ -75,96 +57,4 @@ void ReconfigureEarly() {
|
||||
CHECK(base::allocator::IsAllocatorInitialized());
|
||||
}
|
||||
|
||||
-void ReconfigureAfterFeatureListInit() {
|
||||
- // TODO(bartekn): Switch to DCHECK once confirmed there are no issues.
|
||||
- CHECK(base::FeatureList::GetInstance());
|
||||
-
|
||||
- // Does not use any of the security features yet.
|
||||
- [[maybe_unused]] bool enable_brp = false;
|
||||
- [[maybe_unused]] bool enable_memory_tagging = false;
|
||||
- [[maybe_unused]] bool split_main_partition = false;
|
||||
- [[maybe_unused]] bool use_dedicated_aligned_partition = false;
|
||||
- [[maybe_unused]] bool process_affected_by_brp_flag = false;
|
||||
-
|
||||
-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
- auto bucket_distribution = allocator_shim::BucketDistribution::kNeutral;
|
||||
- // No specified type means we are in the browser.
|
||||
- switch (base::features::kPartitionAllocBucketDistributionParam.Get()) {
|
||||
- case base::features::BucketDistributionMode::kDefault:
|
||||
- break;
|
||||
- case base::features::BucketDistributionMode::kDenser:
|
||||
- bucket_distribution = allocator_shim::BucketDistribution::kDenser;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- allocator_shim::ConfigurePartitions(
|
||||
- allocator_shim::EnableBrp(enable_brp),
|
||||
- allocator_shim::EnableMemoryTagging(enable_memory_tagging),
|
||||
- partition_alloc::TagViolationReportingMode::kDisabled,
|
||||
- allocator_shim::SplitMainPartition(split_main_partition),
|
||||
- allocator_shim::UseDedicatedAlignedPartition(
|
||||
- use_dedicated_aligned_partition),
|
||||
- /*ref_count_size=*/0, bucket_distribution);
|
||||
-#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
-
|
||||
-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
- allocator_shim::internal::PartitionAllocMalloc::Allocator()
|
||||
- ->EnableThreadCacheIfSupported();
|
||||
-
|
||||
- if (base::FeatureList::IsEnabled(
|
||||
- base::features::kPartitionAllocLargeEmptySlotSpanRing)) {
|
||||
- allocator_shim::internal::PartitionAllocMalloc::Allocator()
|
||||
- ->EnableLargeEmptySlotSpanRing();
|
||||
- allocator_shim::internal::PartitionAllocMalloc::AlignedAllocator()
|
||||
- ->EnableLargeEmptySlotSpanRing();
|
||||
- }
|
||||
-#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
-}
|
||||
-
|
||||
-void ReconfigureAfterTaskRunnerInit() {
|
||||
-#if defined(PA_THREAD_CACHE_SUPPORTED) && \
|
||||
- BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
- base::allocator::StartThreadCachePeriodicPurge();
|
||||
-
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
- // Lower thread cache limits to avoid stranding too much memory in the caches.
|
||||
- if (base::SysInfo::IsLowEndDevice()) {
|
||||
- ::partition_alloc::ThreadCacheRegistry::Instance().SetThreadCacheMultiplier(
|
||||
- ::partition_alloc::ThreadCache::kDefaultMultiplier / 2.);
|
||||
- }
|
||||
-#endif // BUILDFLAG(IS_ANDROID)
|
||||
-
|
||||
- // Renderer processes are more performance-sensitive, increase thread cache
|
||||
- // limits.
|
||||
- if (/*is_performance_sensitive=*/true &&
|
||||
- base::FeatureList::IsEnabled(
|
||||
- base::features::kPartitionAllocLargeThreadCacheSize)) {
|
||||
- size_t largest_cached_size =
|
||||
- ::partition_alloc::ThreadCacheLimits::kLargeSizeThreshold;
|
||||
-
|
||||
-#if BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_32_BITS)
|
||||
- // Devices almost always report less physical memory than what they actually
|
||||
- // have, so anything above 3GiB will catch 4GiB and above.
|
||||
- if (base::SysInfo::AmountOfPhysicalMemoryMB() <= 3500)
|
||||
- largest_cached_size =
|
||||
- ::partition_alloc::ThreadCacheLimits::kDefaultSizeThreshold;
|
||||
-#endif // BUILDFLAG(IS_ANDROID) && !defined(ARCH_CPU_64_BITS)
|
||||
-
|
||||
- ::partition_alloc::ThreadCache::SetLargestCachedSize(largest_cached_size);
|
||||
- }
|
||||
-
|
||||
-#endif // defined(PA_THREAD_CACHE_SUPPORTED) &&
|
||||
- // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
-
|
||||
-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
- base::allocator::StartMemoryReclaimer(
|
||||
- base::SingleThreadTaskRunner::GetCurrentDefault());
|
||||
-#endif
|
||||
-
|
||||
- if (base::FeatureList::IsEnabled(
|
||||
- base::features::kPartitionAllocSortActiveSlotSpans)) {
|
||||
- partition_alloc::PartitionRoot::EnableSortActiveSlotSpans();
|
||||
- }
|
||||
-}
|
||||
-
|
||||
} // namespace naive_partition_alloc_support
|
||||
--- a/src/net/tools/naive/partition_alloc_support.h
|
||||
+++ b/src/net/tools/naive/partition_alloc_support.h
|
||||
@@ -9,8 +9,6 @@
|
||||
namespace naive_partition_alloc_support {
|
||||
|
||||
void ReconfigureEarly();
|
||||
-void ReconfigureAfterFeatureListInit();
|
||||
-void ReconfigureAfterTaskRunnerInit();
|
||||
|
||||
} // namespace naive_partition_alloc_support
|
||||
|
|
@ -64,6 +64,9 @@ enable_reporting=false
|
|||
include_transport_security_state_preload_list=false
|
||||
use_nss_certs=false
|
||||
|
||||
enable_backup_ref_ptr_support=false
|
||||
enable_dangling_raw_ptr_checks=false
|
||||
|
||||
target_os=\"openwrt\"
|
||||
target_cpu=\"${naive_arch}\"
|
||||
target_sysroot=\"${toolchain_dir}\""
|
||||
|
|
Loading…
Reference in New Issue