chromium

fetch --no-history chromium

编译后,拉取全部history

git fetch --unshallow 

git fetch --shallow-since=15/11/2012

git fetch --depth=100
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set depot_tools=c:\dev\chromium\depot_tools
set PATH=%depot_tools%;C:\chromium-dev;%PATH%;

gn gen --ide=vs --filters=//chrome --no-deps out\Default  --args="is_component_build=true is_debug=true"
autoninja -C out\Default chrome

gn gen --ide=vs --filters=//chrome --no-deps out\Default  --args="is_component_build=true is_debug=true enable_nacl=false target_cpu=\"x86\" v8_symbol_level=0 cc_wrapper =\"sccache\" chrome_pgo_phase = 0"

target_os="win"
target_cpu="x64"
is_component_build=false
is_debug=false
is_official_build=true

Build options

https://www.chromium.org/developers/gn-build-configuration/

is_debug = false

Component build

The component build links many parts of Chrome into separate shared libraries to avoid the long link step at the end. It is the default when compiling debug non-iOS builds and most developers use this mode for everyday builds and debugging. Startup is slower and some linker optimizations won't work, so don't do benchmarks in this mode. Some people like to turn it on for release builds to get both faster links and reasonable runtime performance.

is_component_build = true

Faster builds with no or minimal symbols

The symbol_level setting varies from 0 (no symbols or minimal symbols) to 2 (full symbols).

symbol_level = 0

Disable Native Client

Most developers don't normally need to test Native Client capabilities and can speed up the build by disabling it.

enable_nacl = false

Remove WebCore symbols

WebCore has lots of templates that account for a large portion of the debugging symbols. If you're not debugging WebCore, you can set the blink symbol level to 0 or 1:

blink_symbol_level=0

Remove v8 symbols

v8 is often the second-largest source of debugging symbols. If you're not debugging v8, you can set the v8 symbol level to 0 or 1:

v8_symbol_level=0

Windows

There is a gn gen argument (--ide) for producing Visual Studio project and solution files:

$ gn gen out\mybuild --ide=vs
gn gen out/debug --ide=vs  --args="is_debug=true is_component_build=true symbol_level=2"

gn gen out/debug --ide=vs2022  --args="is_debug=true is_component_build=true symbol_level=2"

gn gen out/debug --ide=vs2022  --args="is_debug=true is_component_build=true symbol_level=2 enable_nacl=false" && autoninja -C out/debug chrome

>	skia.dll!`anonymous namespace'::CreateBitmapHeaderWithColorDepth(long width, long height, unsigned short color_depth, tagBITMAPINFOHEADER * hdr) Line 39	C++
 	skia.dll!skia::CreateHBitmapXRGB8888(int width, int height, void * shared_section, void * * data) Line 380	C++
 	skia.dll!`anonymous namespace'::Create(int width, int height, void * shared_section, bool do_clear, SkRasterHandleAllocator::Rec * rec) Line 55	C++
 	skia.dll!skia::CreatePlatformCanvasWithSharedSection(int width, int height, bool is_opaque, void * shared_section, skia::OnFailureType failure_type) Line 139	C++
 	components_viz_host.dll!viz::LayeredWindowUpdaterImpl::OnAllocatedSharedMemory(const gfx::Size & pixel_size, base::UnsafeSharedMemoryRegion region) Line 42	C++
 	components_viz_host.dll!viz::mojom::LayeredWindowUpdaterStubDispatch::Accept(viz::mojom::LayeredWindowUpdater * impl, mojo::Message * message) Line 375	C++
 	components_viz_host.dll!viz::mojom::LayeredWindowUpdaterStub<mojo::RawPtrImplRefTraits<viz::mojom::LayeredWindowUpdater>>::Accept(mojo::Message * message) Line 140	C++
 	mojo_public_cpp_bindings.dll!mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message * message) Line 1016	C++
 	mojo_public_cpp_bindings.dll!mojo::InterfaceEndpointClient::HandleIncomingMessageThunk::Accept(mojo::Message * message) Line 363	C++
 	mojo_public_cpp_bindings.dll!mojo::MessageDispatcher::Accept(mojo::Message * message) Line 43	C++
 	mojo_public_cpp_bindings.dll!mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message * message) Line 701	C++
 	mojo_public_cpp_bindings.dll!mojo::internal::MultiplexRouter::ProcessIncomingMessage(mojo::internal::MultiplexRouter::MessageWrapper * message_wrapper, mojo::internal::MultiplexRouter::ClientCallBehavior client_call_behavior, base::SequencedTaskRunner * current_task_runner) Line 1095	C++
 	mojo_public_cpp_bindings.dll!mojo::internal::MultiplexRouter::Accept(mojo::Message * message) Line 708	C++
 	mojo_public_cpp_bindings.dll!mojo::MessageDispatcher::Accept(mojo::Message * message) Line 43	C++
 	mojo_public_cpp_bindings.dll!mojo::Connector::DispatchMessageW(mojo::ScopedHandleBase<mojo::MessageHandle> handle) Line 560	C++
 	mojo_public_cpp_bindings.dll!mojo::Connector::ReadAllAvailableMessages() Line 618	C++
 	mojo_public_cpp_bindings.dll!mojo::Connector::OnHandleReadyInternal(unsigned int result) Line 453	C++
 	mojo_public_cpp_bindings.dll!mojo::Connector::OnWatcherHandleReady(const char * interface_name, unsigned int result) Line 417	C++
 	mojo_public_cpp_bindings.dll!base::internal::FunctorTraits<void (mojo::Connector::*)(const char *, unsigned int),void>::Invoke<void (mojo::Connector::*)(const char *, unsigned int),mojo::Connector *,const char *,unsigned int>(void(mojo::Connector::*)(const char *, unsigned int) method, mojo::Connector * && receiver_ptr, const char * && args, unsigned int && args) Line 714	C++
 	mojo_public_cpp_bindings.dll!base::internal::InvokeHelper<0,void,0,1>::MakeItSo<void (mojo::Connector::*const &)(const char *, unsigned int),const std::__Cr::tuple<base::internal::UnretainedWrapper<mojo::Connector,base::unretained_traits::MayNotDangle,0>,base::internal::UnretainedWrapper<const char,base::unretained_traits::MayNotDangle,0>> &,unsigned int>(void(mojo::Connector::*)(const char *, unsigned int) & functor, const std::__Cr::tuple<base::internal::UnretainedWrapper<mojo::Connector,base::unretained_traits::MayNotDangle,0>,base::internal::UnretainedWrapper<const char,base::unretained_traits::MayNotDangle,0>> & bound, unsigned int && args) Line 893	C++
 	mojo_public_cpp_bindings.dll!base::internal::Invoker<base::internal::BindState<void (mojo::Connector::*)(const char *, unsigned int),base::internal::UnretainedWrapper<mojo::Connector,base::unretained_traits::MayNotDangle,0>,base::internal::UnretainedWrapper<const char,base::unretained_traits::MayNotDangle,0>>,void (unsigned int)>::RunImpl<void (mojo::Connector::*const &)(const char *, unsigned int),const std::__Cr::tuple<base::internal::UnretainedWrapper<mojo::Connector,base::unretained_traits::MayNotDangle,0>,base::internal::UnretainedWrapper<const char,base::unretained_traits::MayNotDangle,0>> &,0,1>(void(mojo::Connector::*)(const char *, unsigned int) & functor, const std::__Cr::tuple<base::internal::UnretainedWrapper<mojo::Connector,base::unretained_traits::MayNotDangle,0>,base::internal::UnretainedWrapper<const char,base::unretained_traits::MayNotDangle,0>> & bound, std::__Cr::integer_sequence<unsigned long long,0,1> seq, unsigned int && unbound_args) Line 993	C++
 	mojo_public_cpp_bindings.dll!base::internal::Invoker<base::internal::BindState<void (mojo::Connector::*)(const char *, unsigned int),base::internal::UnretainedWrapper<mojo::Connector,base::unretained_traits::MayNotDangle,0>,base::internal::UnretainedWrapper<const char,base::unretained_traits::MayNotDangle,0>>,void (unsigned int)>::Run(base::internal::BindStateBase * base, unsigned int unbound_args) Line 957	C++
 	mojo_public_cpp_bindings.dll!base::RepeatingCallback<void (unsigned int)>::Run(unsigned int args) Line 334	C++
 	mojo_public_cpp_bindings.dll!mojo::SimpleWatcher::DiscardReadyState(const base::RepeatingCallback<void (unsigned int)> & callback, unsigned int result, const mojo::HandleSignalsState & state) Line 193	C++
 	mojo_public_cpp_bindings.dll!base::internal::FunctorTraits<void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),void>::Invoke<void (*const &)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),const base::RepeatingCallback<void (unsigned int)> &,unsigned int,const mojo::HandleSignalsState &>(void(*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &) & function, const base::RepeatingCallback<void (unsigned int)> & args, unsigned int && args, const mojo::HandleSignalsState & args) Line 632	C++
 	mojo_public_cpp_bindings.dll!base::internal::InvokeHelper<0,void,0>::MakeItSo<void (*const &)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),const std::__Cr::tuple<base::RepeatingCallback<void (unsigned int)>> &,unsigned int,const mojo::HandleSignalsState &>(void(*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &) & functor, const std::__Cr::tuple<base::RepeatingCallback<void (unsigned int)>> & bound, unsigned int && args, const mojo::HandleSignalsState & args) Line 893	C++
 	mojo_public_cpp_bindings.dll!base::internal::Invoker<base::internal::BindState<void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),base::RepeatingCallback<void (unsigned int)>>,void (unsigned int, const mojo::HandleSignalsState &)>::RunImpl<void (*const &)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),const std::__Cr::tuple<base::RepeatingCallback<void (unsigned int)>> &,0>(void(*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &) & functor, const std::__Cr::tuple<base::RepeatingCallback<void (unsigned int)>> & bound, std::__Cr::integer_sequence<unsigned long long,0> seq, unsigned int && unbound_args, const mojo::HandleSignalsState & unbound_args) Line 993	C++
 	mojo_public_cpp_bindings.dll!base::internal::Invoker<base::internal::BindState<void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),base::RepeatingCallback<void (unsigned int)>>,void (unsigned int, const mojo::HandleSignalsState &)>::Run(base::internal::BindStateBase * base, unsigned int unbound_args, const mojo::HandleSignalsState & unbound_args) Line 957	C++
 	mojo_public_system_cpp.dll!base::RepeatingCallback<void (unsigned int, const mojo::HandleSignalsState &)>::Run(unsigned int args, const mojo::HandleSignalsState & args) Line 334	C++
 	mojo_public_system_cpp.dll!mojo::SimpleWatcher::OnHandleReady(int watch_id, unsigned int result, const mojo::HandleSignalsState & state) Line 279	C++
 	mojo_public_system_cpp.dll!base::internal::FunctorTraits<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &),void>::Invoke<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &),const base::WeakPtr<mojo::SimpleWatcher> &,int,unsigned int,mojo::HandleSignalsState>(void(mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &) method, const base::WeakPtr<mojo::SimpleWatcher> & receiver_ptr, int && args, unsigned int && args, mojo::HandleSignalsState && args) Line 714	C++
 	mojo_public_system_cpp.dll!base::internal::InvokeHelper<1,void,0,1,2,3>::MakeItSo<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &),std::__Cr::tuple<base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState>>(void(mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &) && functor, std::__Cr::tuple<base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState> && bound) Line 925	C++
 	mojo_public_system_cpp.dll!base::internal::Invoker<base::internal::BindState<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &),base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState>,void ()>::RunImpl<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &),std::__Cr::tuple<base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState>,0,1,2,3>(void(mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &) && functor, std::__Cr::tuple<base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState> && bound, std::__Cr::integer_sequence<unsigned long long,0,1,2,3> seq) Line 993	C++
 	mojo_public_system_cpp.dll!base::internal::Invoker<base::internal::BindState<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &),base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState>,void ()>::RunOnce(base::internal::BindStateBase * base) Line 944	C++
 	base.dll!base::OnceCallback<void ()>::Run() Line 153	C++
 	base.dll!base::TaskAnnotator::RunTaskImpl(base::PendingTask & pending_task) Line 222	C++
 	base.dll!base::TaskAnnotator::RunTask<`lambda at ..\..\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:482:11'>(perfetto::StaticString event_name, base::PendingTask & pending_task, base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl::<lambda_0> && args) Line 90	C++
 	base.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow * continuation_lazy_now) Line 489	C++
 	base.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() Line 345	C++
 	base.dll!base::MessagePumpForUI::DoRunLoop() Line 211	C++
 	base.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) Line 78	C++
 	base.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool application_tasks_allowed, base::TimeDelta timeout) Line 648	C++
 	base.dll!base::RunLoop::Run(const base::Location & location) Line 134	C++
 	content.dll!content::BrowserMainLoop::RunMainMessageLoop() Line 1072	C++
 	content.dll!content::BrowserMainRunnerImpl::Run() Line 158	C++
 	content.dll!content::BrowserMain(content::MainFunctionParams parameters) Line 34	C++
 	content.dll!content::RunBrowserProcessMain(content::MainFunctionParams main_function_params, content::ContentMainDelegate * delegate) Line 685	C++
 	content.dll!content::ContentMainRunnerImpl::RunBrowser(content::MainFunctionParams main_params, bool start_minimal_browser) Line 1266	C++
 	content.dll!content::ContentMainRunnerImpl::Run() Line 1116	C++
 	content.dll!content::RunContentProcess(content::ContentMainParams params, content::ContentMainRunner * content_main_runner) Line 326	C++
 	content.dll!content::ContentMain(content::ContentMainParams params) Line 343	C++
 	chrome.dll!ChromeMain(HINSTANCE__ * instance, sandbox::SandboxInterfaceInfo * sandbox_info, __int64 exe_entry_point_ticks) Line 187	C++
 	chrome.exe!MainDllLoader::Launch(HINSTANCE__ * instance, base::TimeTicks exe_entry_point_ticks) Line 166	C++
 	chrome.exe!wWinMain(HINSTANCE__ * instance, HINSTANCE__ * prev, wchar_t *, int) Line 390	C++
posted @ 2023-08-18 14:02  fndefbwefsowpvqfx  阅读(41)  评论(0编辑  收藏  举报