2
0
ruki 3 жил өмнө
parent
commit
f5f746589b

+ 0 - 2
guide/configuration.md

@@ -63,8 +63,6 @@ $ xmake f -p watchos --appledev=simulator
 $ xmake f -p appletvos --appledev=simulator
 ```
 
-Translated with www.DeepL.com/Translator (free version)
-
 ### Windows
 
 ```bash

+ 69 - 2
manual/project_target.md

@@ -2617,8 +2617,6 @@ Or configure multiple policy values at the same time, separated by commas.
 $ xmake f --policies=package.precompiled:n,package.install_only
 ```
 
-Translated with www.DeepL.com/Translator (free version)
-
 ##### check.auto_ignore_flags
 
 By default, xmake will automatically detect all the original flags set by the `add_cxflags` and` add_ldflags` interfaces. If the current compiler and linker do not support them, they will be automatically ignored.
@@ -2692,6 +2690,75 @@ Of course, if the build source files in some special targets depend on previous
 set_policy("build.across_targets_in_parallel", false)
 ```
 
+##### build.merge_archive
+
+If this policy is set, then the target libraries that are dependent on using `add_deps()` no longer exist as links, but are merged directly into the parent target library.
+
+Example.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("add")
+    set_kind("static")
+    add_files("src/add.c")
+    add_files("src/subdir/add.c")
+
+target("sub")
+    set_kind("static")
+    add_files("src/sub.c")
+    add_files("src/subdir/sub.c")
+
+target("mul")
+    set_kind("static")
+    add_deps("add", "sub")
+    add_files("src/mul.c")
+    set_policy("build.merge_archive", true)
+
+target("test")
+    add_deps("mul")
+    add_files("src/main.c")
+```
+
+The libmul.a static library automatically merges the libadd.a and libsub.a sub-dependent static libraries.
+
+
+##### build.ccache
+
+Xmake has a built-in build cache enabled by default, which can be explicitly disabled by setting this policy.
+
+```lua
+set_policy("build.ccache", false)
+```
+
+Of course, we can also disable it on the command line.
+
+```bash
+$ xmake f --ccache=n
+```
+
+or
+
+```bash
+$ xmake f --policies=build.ccache:n
+```
+
+##### package.requires_lock
+
+Can be used to enable version locking of dependency packages introduced by ``add_requires()`''.
+
+##### package.precompiled
+
+Can be used to disable fetching of precompiled dependency packages under windows.
+
+##### package.fetch_only
+
+If this policy is enabled, then all dependencies will only be fetched from the system and not downloaded and installed from a remote location.
+
+##### package.install_only
+
+If this policy is enabled, then all dependencies will only be downloaded and installed remotely, not fetched from the system.
+
 ### target:set_runtimes
 
 #### Set the runtime library of the compilation target

+ 0 - 1
mirror/guide/configuration.html

@@ -125,7 +125,6 @@ $ xmake
 $ xmake f -p watchos --appledev=simulator
 $ xmake f -p appletvos --appledev=simulator
 </code></pre>
-<p>Translated with <a href="http://www.DeepL.com/Translator">www.DeepL.com/Translator</a> (free version)</p>
 <h3 id="windows">Windows</h3>
 <pre><code class="lang-bash">$ xmake f -p windows [-a x86|x64]
 $ xmake

+ 44 - 1
mirror/manual/project_target.html

@@ -2207,7 +2207,6 @@ ${define FOO_STRING}
 <p>Or configure multiple policy values at the same time, separated by commas.</p>
 <pre><code class="lang-bash">$ xmake f --policies=package.precompiled:n,package.install_only
 </code></pre>
-<p>Translated with <a href="http://www.DeepL.com/Translator">www.DeepL.com/Translator</a> (free version)</p>
 <h5 id="checkauto_ignore_flags">check.auto_ignore_flags</h5>
 <p>By default, xmake will automatically detect all the original flags set by the <code>add_cxflags</code> and<code>add_ldflags</code> interfaces. If the current compiler and linker do not support them, they will be automatically ignored.</p>
 <p>This is usually very useful. Like some optional compilation flags, it can be compiled normally even if it is not supported, but it is forced to set up. When compiling, other users may have a certain degree of difference due to the different support of the compiler. The compilation failed.</p>
@@ -2245,6 +2244,50 @@ target("test")
 <p>Of course, if the build source files in some special targets depend on previous targets (especially in the case of some custom rules, although rarely encountered), we can also disable this optimization behavior through the following settings:</p>
 <pre><code class="lang-bash">set_policy("build.across_targets_in_parallel", false)
 </code></pre>
+<h5 id="buildmerge_archive">build.merge_archive</h5>
+<p>If this policy is set, then the target libraries that are dependent on using <code>add_deps()</code> no longer exist as links, but are merged directly into the parent target library.</p>
+<p>Example.</p>
+<pre><code class="lang-lua">add_rules("mode.debug", "mode.release")
+
+target("add")
+    set_kind("static")
+    add_files("src/add.c")
+    add_files("src/subdir/add.c")
+
+target("sub")
+    set_kind("static")
+    add_files("src/sub.c")
+    add_files("src/subdir/sub.c")
+
+target("mul")
+    set_kind("static")
+    add_deps("add", "sub")
+    add_files("src/mul.c")
+    set_policy("build.merge_archive", true)
+
+target("test")
+    add_deps("mul")
+    add_files("src/main.c")
+</code></pre>
+<p>The libmul.a static library automatically merges the libadd.a and libsub.a sub-dependent static libraries.</p>
+<h5 id="buildccache">build.ccache</h5>
+<p>Xmake has a built-in build cache enabled by default, which can be explicitly disabled by setting this policy.</p>
+<pre><code class="lang-lua">set_policy("build.ccache", false)
+</code></pre>
+<p>Of course, we can also disable it on the command line.</p>
+<pre><code class="lang-bash">$ xmake f --ccache=n
+</code></pre>
+<p>or</p>
+<pre><code class="lang-bash">$ xmake f --policies=build.ccache:n
+</code></pre>
+<h5 id="packagerequires_lock">package.requires_lock</h5>
+<p>Can be used to enable version locking of dependency packages introduced by <code></code>add_requires()`&#39;&#39;.</p>
+<h5 id="packageprecompiled">package.precompiled</h5>
+<p>Can be used to disable fetching of precompiled dependency packages under windows.</p>
+<h5 id="packagefetch_only">package.fetch_only</h5>
+<p>If this policy is enabled, then all dependencies will only be fetched from the system and not downloaded and installed from a remote location.</p>
+<h5 id="packageinstall_only">package.install_only</h5>
+<p>If this policy is enabled, then all dependencies will only be downloaded and installed remotely, not fetched from the system.</p>
 <h3 id="targetset_runtimes">target:set_runtimes</h3>
 <h4 id="settheruntimelibraryofthecompilationtarget">Set the runtime library of the compilation target</h4>
 <p>This is a newly added interface since v2.5.1, which is used to abstractly set the runtime library that the compilation target depends on. Currently, only the abstraction of the msvc runtime library is supported, but the mapping to other compiler runtime libraries may be expanded in the future.</p>

+ 44 - 0
mirror/zh-cn/manual/project_target.html

@@ -2264,6 +2264,50 @@ target("test")
 <p>当然,如果有些特殊的target里面的构建源文件要依赖先前的target(尤其是一些自定义rules的情况,虽然很少遇到),我们也可以通过下面的设置禁用这个优化行为:</p>
 <pre><code class="lang-bash">set_policy("build.across_targets_in_parallel", false)
 </code></pre>
+<h5 id="buildmerge_archive">build.merge_archive</h5>
+<p>如果设置了这个策略,那么使用 <code>add_deps()</code> 依赖的目标库不再作为链接存在,而是直接把它们合并到父目标库中去。</p>
+<p>例如:</p>
+<pre><code class="lang-lua">add_rules("mode.debug", "mode.release")
+
+target("add")
+    set_kind("static")
+    add_files("src/add.c")
+    add_files("src/subdir/add.c")
+
+target("sub")
+    set_kind("static")
+    add_files("src/sub.c")
+    add_files("src/subdir/sub.c")
+
+target("mul")
+    set_kind("static")
+    add_deps("add", "sub")
+    add_files("src/mul.c")
+    set_policy("build.merge_archive", true)
+
+target("test")
+    add_deps("mul")
+    add_files("src/main.c")
+</code></pre>
+<p>libmul.a 静态库会自动合并 libadd.a 和 libsub.a 两个子依赖的静态库。</p>
+<h5 id="buildccache">build.ccache</h5>
+<p>Xmake 默认是开启内置的编译缓存的,通过设置这个策略,可以显式禁用缓存。</p>
+<pre><code class="lang-lua">set_policy("build.ccache", false)
+</code></pre>
+<p>当然,我们也可以命令行去禁用它。</p>
+<pre><code class="lang-bash">$ xmake f --ccache=n
+</code></pre>
+<p>或者</p>
+<pre><code class="lang-bash">$ xmake f --policies=build.ccache:n
+</code></pre>
+<h5 id="packagerequires_lock">package.requires_lock</h5>
+<p>可用于开启 <code>add_requires()</code> 引入的依赖包的版本锁定。</p>
+<h5 id="packageprecompiled">package.precompiled</h5>
+<p>可用于禁用 windows 下预编译依赖包的获取。</p>
+<h5 id="packagefetch_only">package.fetch_only</h5>
+<p>如果开启这个策略,那么所有的依赖包仅仅只会从系统获取,不会从远程下载安装。</p>
+<h5 id="packageinstall_only">package.install_only</h5>
+<p>如果开启这个策略,纳闷所有的依赖包仅仅只会走远程下载安装,不会从系统查找获取。</p>
 <h3 id="targetset_runtimes">target:set_runtimes</h3>
 <h4 id="">设置编译目标依赖的运行时库</h4>
 <p>这是 v2.5.1 开始新增的接口,用于抽象化设置编译目标依赖的运行时库,目前仅仅支持对 msvc 运行时库的抽象,但后续也许会扩展对其他编译器运行时库的映射。</p>

+ 90 - 90
sitemap.xml

@@ -12,452 +12,452 @@
 
 <url>
   <loc>https://xmake.io/mirror/guide/project_examples.html</loc>
-  <lastmod>2022-05-29T11:00:21+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:23+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/other_features.html</loc>
-  <lastmod>2022-05-29T11:00:21+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:23+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/quickstart.html</loc>
-  <lastmod>2022-05-29T11:00:22+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:23+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/faq.html</loc>
-  <lastmod>2022-05-29T11:00:22+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:23+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/configuration.html</loc>
-  <lastmod>2022-05-29T11:00:22+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:24+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/syntax_description.html</loc>
-  <lastmod>2022-05-29T11:00:22+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:24+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/installation.html</loc>
-  <lastmod>2022-05-29T11:00:22+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:24+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/plugin/plugin_development.html</loc>
-  <lastmod>2022-05-29T11:00:23+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:24+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/plugin/more_plugins.html</loc>
-  <lastmod>2022-05-29T11:00:23+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:24+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/plugin/builtin_plugins.html</loc>
-  <lastmod>2022-05-29T11:00:23+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:24+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/awesome.html</loc>
-  <lastmod>2022-05-29T11:00:23+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:25+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/technical_support.html</loc>
-  <lastmod>2022-05-29T11:00:23+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:25+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/changelog.html</loc>
-  <lastmod>2022-05-29T11:00:24+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:25+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/contact.html</loc>
-  <lastmod>2022-05-29T11:00:24+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:25+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/introduction.html</loc>
-  <lastmod>2022-05-29T11:00:24+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:25+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/who_is_using_xmake.html</loc>
-  <lastmod>2022-05-29T11:00:24+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:26+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/sponsor.html</loc>
-  <lastmod>2022-05-29T11:00:24+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:26+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/index.html</loc>
-  <lastmod>2022-05-29T11:00:25+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:26+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/project_examples.html</loc>
-  <lastmod>2022-05-29T11:00:25+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:26+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/other_features.html</loc>
-  <lastmod>2022-05-29T11:00:25+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:27+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/quickstart.html</loc>
-  <lastmod>2022-05-29T11:00:25+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:27+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/faq.html</loc>
-  <lastmod>2022-05-29T11:00:25+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:27+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/configuration.html</loc>
-  <lastmod>2022-05-29T11:00:26+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:27+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/syntax_description.html</loc>
-  <lastmod>2022-05-29T11:00:26+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:27+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/installation.html</loc>
-  <lastmod>2022-05-29T11:00:26+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:28+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/plugin/plugin_development.html</loc>
-  <lastmod>2022-05-29T11:00:26+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:28+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/plugin/more_plugins.html</loc>
-  <lastmod>2022-05-29T11:00:26+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:28+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/plugin/builtin_plugins.html</loc>
-  <lastmod>2022-05-29T11:00:27+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:28+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/awesome.html</loc>
-  <lastmod>2022-05-29T11:00:27+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:28+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/technical_support.html</loc>
-  <lastmod>2022-05-29T11:00:27+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:29+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/changelog.html</loc>
-  <lastmod>2022-05-29T11:00:27+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:29+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/contact.html</loc>
-  <lastmod>2022-05-29T11:00:27+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:29+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/peripheral_items.html</loc>
-  <lastmod>2022-05-29T11:00:27+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:29+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/introduction.html</loc>
-  <lastmod>2022-05-29T11:00:28+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:30+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/who_is_using_xmake.html</loc>
-  <lastmod>2022-05-29T11:00:28+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:30+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/sponsor.html</loc>
-  <lastmod>2022-05-29T11:00:28+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:30+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/course.html</loc>
-  <lastmod>2022-05-29T11:00:28+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:30+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/index.html</loc>
-  <lastmod>2022-05-29T11:00:28+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:31+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/getting_started.html</loc>
-  <lastmod>2022-05-29T11:00:29+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:31+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/specification.html</loc>
-  <lastmod>2022-05-29T11:00:29+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:31+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/builtin_variables.html</loc>
-  <lastmod>2022-05-29T11:00:29+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:31+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/conditions.html</loc>
-  <lastmod>2022-05-29T11:00:29+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:32+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/custom_rule.html</loc>
-  <lastmod>2022-05-29T11:00:29+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:32+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/target_instance.html</loc>
-  <lastmod>2022-05-29T11:00:30+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:32+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/project_target.html</loc>
-  <lastmod>2022-05-29T11:00:30+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:32+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/builtin_modules.html</loc>
-  <lastmod>2022-05-29T11:00:30+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:32+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/custom_toolchain.html</loc>
-  <lastmod>2022-05-29T11:00:30+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:33+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/plugin_task.html</loc>
-  <lastmod>2022-05-29T11:00:30+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:33+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/package_dependencies.html</loc>
-  <lastmod>2022-05-29T11:00:31+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:33+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/configuration_option.html</loc>
-  <lastmod>2022-05-29T11:00:31+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:33+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/extension_modules.html</loc>
-  <lastmod>2022-05-29T11:00:31+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:34+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/helper_interfaces.html</loc>
-  <lastmod>2022-05-29T11:00:31+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:34+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/global_interfaces.html</loc>
-  <lastmod>2022-05-29T11:00:31+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:34+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/package_instance.html</loc>
-  <lastmod>2022-05-29T11:00:32+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:34+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/option_instance.html</loc>
-  <lastmod>2022-05-29T11:00:32+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:35+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/theme/builtin_themes.html</loc>
-  <lastmod>2022-05-29T11:00:32+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:35+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/theme/switch_theme.html</loc>
-  <lastmod>2022-05-29T11:00:32+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:35+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/package/local_3rd_source_library.html</loc>
-  <lastmod>2022-05-29T11:00:32+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:36+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/package/local_package_old.html</loc>
-  <lastmod>2022-05-29T11:00:33+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:36+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/package/local_package.html</loc>
-  <lastmod>2022-05-29T11:00:33+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:36+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/package/system_package.html</loc>
-  <lastmod>2022-05-29T11:00:33+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:37+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/package/remote_package.html</loc>
-  <lastmod>2022-05-29T11:00:33+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:37+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/toolchain/remote_toolchain.html</loc>
-  <lastmod>2022-05-29T11:00:33+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:37+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/toolchain/builtin_toolchains.html</loc>
-  <lastmod>2022-05-29T11:00:33+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:37+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/getting_started.html</loc>
-  <lastmod>2022-05-29T11:00:34+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:38+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/specification.html</loc>
-  <lastmod>2022-05-29T11:00:34+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:38+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/builtin_variables.html</loc>
-  <lastmod>2022-05-29T11:00:34+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:38+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/conditions.html</loc>
-  <lastmod>2022-05-29T11:00:34+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:39+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/custom_rule.html</loc>
-  <lastmod>2022-05-29T11:00:34+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:39+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/target_instance.html</loc>
-  <lastmod>2022-05-29T11:00:35+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:39+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/project_target.html</loc>
-  <lastmod>2022-05-29T11:00:35+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:40+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/builtin_modules.html</loc>
-  <lastmod>2022-05-29T11:00:35+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:40+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/custom_toolchain.html</loc>
-  <lastmod>2022-05-29T11:00:35+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:40+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/plugin_task.html</loc>
-  <lastmod>2022-05-29T11:00:35+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:40+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/package_dependencies.html</loc>
-  <lastmod>2022-05-29T11:00:36+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:41+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/configuration_option.html</loc>
-  <lastmod>2022-05-29T11:00:36+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:41+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/extension_modules.html</loc>
-  <lastmod>2022-05-29T11:00:36+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:41+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/helper_interfaces.html</loc>
-  <lastmod>2022-05-29T11:00:36+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:42+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/global_interfaces.html</loc>
-  <lastmod>2022-05-29T11:00:36+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:42+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/package_instance.html</loc>
-  <lastmod>2022-05-29T11:00:37+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:42+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/option_instance.html</loc>
-  <lastmod>2022-05-29T11:00:37+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:43+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/theme/builtin_themes.html</loc>
-  <lastmod>2022-05-29T11:00:37+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:43+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/theme/switch_theme.html</loc>
-  <lastmod>2022-05-29T11:00:37+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:43+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/package/local_3rd_source_library.html</loc>
-  <lastmod>2022-05-29T11:00:37+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:44+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/package/local_package_old.html</loc>
-  <lastmod>2022-05-29T11:00:37+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:44+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/package/local_package.html</loc>
-  <lastmod>2022-05-29T11:00:38+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:44+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/package/system_package.html</loc>
-  <lastmod>2022-05-29T11:00:38+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:44+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/package/remote_package.html</loc>
-  <lastmod>2022-05-29T11:00:38+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:45+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/toolchain/remote_toolchain.html</loc>
-  <lastmod>2022-05-29T11:00:38+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:45+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/toolchain/builtin_toolchains.html</loc>
-  <lastmod>2022-05-29T11:00:38+08:00</lastmod>
+  <lastmod>2022-05-29T11:13:45+08:00</lastmod>
 </url>
 
 </urlset>

+ 69 - 0
zh-cn/manual/project_target.md

@@ -2698,6 +2698,75 @@ set_policy("check.auto_map_flags", false)
 set_policy("build.across_targets_in_parallel", false)
 ```
 
+##### build.merge_archive
+
+如果设置了这个策略,那么使用 `add_deps()` 依赖的目标库不再作为链接存在,而是直接把它们合并到父目标库中去。
+
+例如:
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("add")
+    set_kind("static")
+    add_files("src/add.c")
+    add_files("src/subdir/add.c")
+
+target("sub")
+    set_kind("static")
+    add_files("src/sub.c")
+    add_files("src/subdir/sub.c")
+
+target("mul")
+    set_kind("static")
+    add_deps("add", "sub")
+    add_files("src/mul.c")
+    set_policy("build.merge_archive", true)
+
+target("test")
+    add_deps("mul")
+    add_files("src/main.c")
+```
+
+libmul.a 静态库会自动合并 libadd.a 和 libsub.a 两个子依赖的静态库。
+
+
+##### build.ccache
+
+Xmake 默认是开启内置的编译缓存的,通过设置这个策略,可以显式禁用缓存。
+
+```lua
+set_policy("build.ccache", false)
+```
+
+当然,我们也可以命令行去禁用它。
+
+```bash
+$ xmake f --ccache=n
+```
+
+或者
+
+```bash
+$ xmake f --policies=build.ccache:n
+```
+
+##### package.requires_lock
+
+可用于开启 `add_requires()` 引入的依赖包的版本锁定。
+
+##### package.precompiled
+
+可用于禁用 windows 下预编译依赖包的获取。
+
+##### package.fetch_only
+
+如果开启这个策略,那么所有的依赖包仅仅只会从系统获取,不会从远程下载安装。
+
+##### package.install_only
+
+如果开启这个策略,纳闷所有的依赖包仅仅只会走远程下载安装,不会从系统查找获取。
+
 ### target:set_runtimes
 
 #### 设置编译目标依赖的运行时库