未验证 提交 c4d24902 编写于 作者: O openharmony_ci 提交者: Gitee

!6851 refactor: sysroot部件化

Merge pull request !6851 from Zhaotianyu/20220716sysroot_lite
......@@ -48,14 +48,14 @@ Common compilation modes of user-mode programs include:
Example:
```
clang --target=arm-liteos --sysroot=prebuilts/lite/sysroot -o helloworld helloworld.c
clang --target=arm-liteos --sysroot=sysroot -o helloworld helloworld.c
```
Before running the **clang** command, install the LLVM compiler. For details, see [Installing LLVM](../quick-start/quickstart-lite-steps-hi3861-setting.md).
**--target=arm-liteos**: specifies the compilation platform, which is arm-liteos.
**--sysroot=$\{YOUR\_ROOT\_PATH\}/prebuilts/lite/sysroot**: specifies the directory in which you can search for the header file and the dependent standard libraries.
**--sysroot=$\{YOUR\_ROOT\_OUT\_PATH\}/sysroot**: specifies the directory in which you can search for the header file and the dependent standard libraries.
A user-mode program can be started in either of the following ways:
......
......@@ -348,7 +348,7 @@ The following steps show how to configure and modify the toolchains for cross-co
#toolchain: follow up-layer, depend on $ohos_build_compiler
if (ohos_build_compiler == "clang") {
CMAKE_TOOLCHAIN_FLAG = "-DOHOS_SYSROOT_PATH=${ohos_root_path}prebuilts/lite/sysroot/"
CMAKE_TOOLCHAIN_FLAG = "-DOHOS_SYSROOT_PATH=${root_out_dir}sysroot/"
} else {
CMAKE_TOOLCHAIN_FLAG = ""
}
......
......@@ -262,9 +262,9 @@ if (ohos_build_thirdparty_migrated_from_fuchisa == true) {
TEST_ENABLE = "YES"
if (TEST_ENABLE == "YES") {
MAKE_COMMAND = "make test OHOS_SYSROOT_PATH=${ohos_root_path}prebuilts/lite/sysroot/"
MAKE_COMMAND = "make test OHOS_SYSROOT_PATH=${root_out_dir}sysroot/"
} else {
MAKE_COMMAND = "make OHOS_SYSROOT_PATH=${ohos_root_path}prebuilts/lite/sysroot/"
MAKE_COMMAND = "make OHOS_SYSROOT_PATH=${root_out_dir}sysroot/"
}
```
......
......@@ -219,7 +219,7 @@ CMake方式可通过指定工具链进行交叉编译,修改并编译该库,
#toolchain:follow up-layer,depend on $ohos_build_compiler
if (ohos_build_compiler == "clang") {
CMAKE_TOOLCHAIN_FLAG = "-DOHOS_SYSROOT_PATH=${ohos_root_path}prebuilts/lite/sysroot/"
CMAKE_TOOLCHAIN_FLAG = "-DOHOS_SYSROOT_PATH=${root_out_dir}sysroot"
} else {
CMAKE_TOOLCHAIN_FLAG = ""
}
......
......@@ -173,9 +173,9 @@ if (ohos_build_thirdparty_migrated_from_fuchisa == true) {
TEST_ENABLE = "YES"
if (TEST_ENABLE == "YES") {
MAKE_COMMAND = "make test OHOS_SYSROOT_PATH=${ohos_root_path}prebuilts/lite/sysroot/"
MAKE_COMMAND = "make test OHOS_SYSROOT_PATH=${root_out_dir}sysroot/"
} else {
MAKE_COMMAND = "make OHOS_SYSROOT_PATH=${ohos_root_path}prebuilts/lite/sysroot/"
MAKE_COMMAND = "make OHOS_SYSROOT_PATH=${root_out_dir}sysroot/"
}
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册