Movatterモバイル変換


[0]ホーム

URL:


project logoChromium Docs

Using CCache on Mac

ccache is a compiler cache. It speeds up recompilation of C/C++ code by caching previous compilations and detecting when the same compilation is being done again. This often results in a significant speedup in common compilations, especially when switching between branches. This page is about using ccache on Mac with clang and the Ninja build system.

Contents

Installation

To install ccache withHomebrew, runbrew install ccache. WithMacPorts, runport install ccache. You can also download and install yourself, using theinstructions in the repository.

Make sure ccache can be found in your$PATH.

Use with GN

You just need to set thecc_wrapper GN variable. You can do so by runninggn args out/Default and addingcc_wrapper="env CCACHE_SLOPPINESS=time_macros ccache" to the build arguments.

Build

After setting thecc_wrapper GN variable you can just run ninja as normal:

ninja-Cout/Default chrome

Optional Steps

  • Configure ccache to use a different cache size withccache -M <max size>. You can see a list of configuration options by callingccache alone.

[8]ページ先頭

©2009-2025 Movatter.jp