From e86f992d26a79cad76244c4444d113e45afa9b88 Mon Sep 17 00:00:00 2001 From: Jakub Sujak Date: Wed, 5 Jul 2023 17:30:02 +0100 Subject: Pack CKW objects into Compute Library archive Previously, building the `arm_compute-static` archive would fail the linking stage due to the Compute Kernel Writer (CKW) symbols not being correctly included. We fix this issue by collecting the built CKW objects and packing them into the Compute Library archive during SCons build time. Compiling the shared library remains unchanged, and still statically links against CKW. Resolves: COMPMID-6342 Change-Id: I841ed7379652fbede6afe9e90a98202656683086 Signed-off-by: Jakub Sujak Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9873 Reviewed-by: SiCong Li Reviewed-by: Viet-Hoa Do Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Benchmark: Arm Jenkins --- compute_kernel_writer/CMakeLists.txt | 2 ++ compute_kernel_writer/README.md | 1 + compute_kernel_writer/prototype/CMakeLists.txt | 2 ++ 3 files changed, 5 insertions(+) (limited to 'compute_kernel_writer') diff --git a/compute_kernel_writer/CMakeLists.txt b/compute_kernel_writer/CMakeLists.txt index f739824402..3bc2aeda63 100644 --- a/compute_kernel_writer/CMakeLists.txt +++ b/compute_kernel_writer/CMakeLists.txt @@ -43,6 +43,7 @@ message(STATUS "${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_VERSION}") option(CKW_ENABLE_OPENCL "Enable OpenCL code generation" OFF) option(CKW_ENABLE_ASSERTS "Enable assertions. Always enabled in Debug builds" OFF) option(CKW_BUILD_TESTING "Build the Compute Kernel Writer validation test suite" OFF) +option(CKW_BUILD_PROTOTYPE "Build the prototype implementation of kernel writer." OFF) option(CKW_CCACHE "Use compiler cache for faster recompilation" OFF) #--------------------------------------------------------------------- @@ -105,6 +106,7 @@ target_compile_options(ckw # Set CMAKE_CXX_FLAGS last so user can overwrite options ${CMAKE_CXX_FLAGS} PRIVATE + # Always optimize for binary size $<$:-Os> ) diff --git a/compute_kernel_writer/README.md b/compute_kernel_writer/README.md index 8a24fe20ec..9a920b7882 100644 --- a/compute_kernel_writer/README.md +++ b/compute_kernel_writer/README.md @@ -82,5 +82,6 @@ This project can be configured with the following build options. Enable options | CKW_ENABLE_OPENCL | Enable OpenCL code generation. | | CKW_ENABLE_ASSERTS | Enable assertions. Always enabled for Debug builds. | | CKW_BUILD_TESTING | Build the validation test suite. | +| CKW_BUILD_PROTOTYPE | Build the prototype implementation. | | CKW_CCACHE | Use compiler cache for faster recompilation. | | CMAKE_TOOLCHAIN_FILE | When cross-compiling, set this variable to the path of the CMake toolchain file. | diff --git a/compute_kernel_writer/prototype/CMakeLists.txt b/compute_kernel_writer/prototype/CMakeLists.txt index 84436a95d6..0def9eacf7 100644 --- a/compute_kernel_writer/prototype/CMakeLists.txt +++ b/compute_kernel_writer/prototype/CMakeLists.txt @@ -43,6 +43,8 @@ target_compile_options(ckw_prototype "$<$:${CKW_ASSERTS_OPTS}>" "$<$:${CKW_ASSERTS_OPTS}>" ${CMAKE_CXX_FLAGS} + PRIVATE + $<$:-Os> ) target_compile_definitions(ckw_prototype PUBLIC -- cgit v1.2.1