diff options
author | Cheng Yangyang <chengyangyang-hf@loongson.cn> | 2023-06-15 17:05:07 +0800 |
---|---|---|
committer | Frank Barchard <fbarchard@chromium.org> | 2023-06-19 17:47:05 +0000 |
commit | c0031cfd95e131c7b11be41d0272455cc63f10f4 (patch) | |
tree | b4e5447d26b36e593a6e81faeb24628a3281362e /BUILD.gn | |
parent | eaaf27ba9148df349973f5e6041f915d40d049e7 (diff) | |
download | libyuv-c0031cfd95e131c7b11be41d0272455cc63f10f4.tar.gz |
Add GN builds on loongarch platform.
Currently, chromium has merged loongarch config file in bug:1454442,
and so we resubmit gn builds support for loongarch.
Bug: chromium:1289502
Change-Id: Iac83f5ea016945f7d9cc5f6de20d4c561bab6347
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4615589
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'BUILD.gn')
-rw-r--r-- | BUILD.gn | 52 |
1 files changed, 52 insertions, 0 deletions
@@ -36,6 +36,12 @@ config("libyuv_config") { if (libyuv_disable_rvv) { defines += [ "LIBYUV_DISABLE_RVV" ] } + if (!libyuv_use_lsx) { + defines += [ "LIBYUV_DISABLE_LSX" ] + } + if (!libyuv_use_lasx) { + defines += [ "LIBYUV_DISABLE_LASX" ] + } } # This target is built when no specific target is specified on the command line. @@ -74,6 +80,14 @@ group("libyuv") { deps += [ ":libyuv_msa" ] } + if (libyuv_use_lsx) { + deps += [ ":libyuv_lsx"] + } + + if (libyuv_use_lasx) { + deps += [ ":libyuv_lasx"] + } + if (!is_ios && !libyuv_disable_jpeg) { # Make sure that clients of libyuv link with libjpeg. This can't go in # libyuv_internal because in Windows x64 builds that will generate a clang @@ -236,6 +250,44 @@ if (libyuv_use_msa) { } } +if (libyuv_use_lsx) { + static_library("libyuv_lsx") { + sources = [ + # LSX Source Files + "source/row_lsx.cc", + "source/rotate_lsx.cc", + "source/scale_lsx.cc", + ] + + cflags_cc = [ + "-mlsx", + "-Wno-c++11-narrowing", + ] + + deps = [ ":libyuv_internal" ] + + public_configs = [ ":libyuv_config" ] + } +} + +if (libyuv_use_lasx) { + static_library("libyuv_lasx") { + sources = [ + # LASX Source Files + "source/row_lasx.cc", + ] + + cflags_cc = [ + "-mlasx", + "-Wno-c++11-narrowing", + ] + + deps = [ ":libyuv_internal" ] + + public_configs = [ ":libyuv_config" ] + } +} + if (libyuv_include_tests) { config("libyuv_unittest_warnings_config") { if (!is_win) { |