diff options
author | Bruce Lai <bruce.lai@sifive.com> | 2023-07-24 22:07:29 -0700 |
---|---|---|
committer | libyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-07-25 09:21:59 +0000 |
commit | b76fcd465408d9daf23e15d9dcd1d17df1397e8f (patch) | |
tree | 4c345fa36e0b3db8bf0aed13263d17fea3acf0ff /docs | |
parent | 423e2b97eafc548f688d5cd79f1f3ef43785e0ba (diff) | |
download | libyuv-b76fcd465408d9daf23e15d9dcd1d17df1397e8f.tar.gz |
[RISC-V] Support CMake build with custom compiler flags
This CL aims to support custom compiler flags.
Because upstream clang has supported to build for x280 with -mcpu=sifive-x280.
Change-Id: Ic8fbf026fe6805ac5c3422a9ccc3f53293c89570
Signed-off-by: Bruce Lai <bruce.lai@sifive.com>
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4713191
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/getting_started.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/getting_started.md b/docs/getting_started.md index d04e2d48..f2f71b8b 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -238,6 +238,18 @@ After running script, clang & qemu are built in `build-toolchain-qemu/riscv-clan -DUSE_RVV=ON . cmake --build out/Release/ +#### Customized Compiler Flags + +Customized compiler flags are supported by `-DRISCV_COMPILER_FLAGS="xxx"`. +If `-DRISCV_COMPILER_FLAGS="xxx"` is manually assigned, other compile flags(e.g disable -march=xxx) will not be appended. + +Example: + + cmake -B out/Release/ -DUNIT_TEST=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_TOOLCHAIN_FILE="./riscv_script/riscv-clang.cmake" \ + -DRISCV_COMPILER_FLAGS="-mcpu=sifive-x280" \ + . ### Run on QEMU |