From cd762b4e5cf8af5df98391c567c836763d3d15de Mon Sep 17 00:00:00 2001 From: Thomas Roos Date: Thu, 19 Dec 2024 12:35:33 +0000 Subject: [PATCH] cleanup --- .github/workflows/static-packaging.yml | 5 ++--- CMakeLists.txt | 28 -------------------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/.github/workflows/static-packaging.yml b/.github/workflows/static-packaging.yml index 0889b8d9d..9f2b62bfd 100644 --- a/.github/workflows/static-packaging.yml +++ b/.github/workflows/static-packaging.yml @@ -21,8 +21,7 @@ jobs: uses: actions/cache@v4 with: path: | - ~/.local/share/containers - !~/.local/share/containers/storage/overlay + ../../../.local/share/containers/ key: ${{ runner.os }}-${{ matrix.architecture }}-podman-${{ hashFiles('misc/staticbuildtestcontainer/*') }} restore-keys: | ${{ runner.os }}-${{ matrix.architecture }}-podman- @@ -34,7 +33,7 @@ jobs: shell: bash run: | # this will link static if no shared alternative lib is available - podman run -v $PWD/.:/aws-greengrass-lite --replace --name ggl container:latest bash -c "\ + podman run --userns=keep-id -v $PWD/.:/aws-greengrass-lite --replace --name ggl container:latest bash -c "\ cd /aws-greengrass-lite && \ rm -rf build/ && \ cmake -B build \ diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bb168011..51fdf49eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,9 +30,6 @@ set(GGL_SYSTEMD_SYSTEM_GROUP "ggcore" CACHE STRING "Core service group") -option(STATIC_LINK_CORE_LIBS - "Statically link core libraries (OpenSSL, libcurl)" OFF) - # # Misc # @@ -283,29 +280,6 @@ check_c_source_compiles( # Add components # -# Setup static linking for target -function(setup_static_linking target) - if(STATIC_LINK_CORE_LIBS) - target_link_libraries( - ${target} - PRIVATE $ - $ - $) - target_include_directories( - ${target} - PRIVATE ${openssl_STATIC_INCLUDE_DIRS} ${libcurl_STATIC_INCLUDE_DIRS} - ${sqlite3_STATIC_INCLUDE_DIRS}) - target_compile_options( - ${target} - PRIVATE ${openssl_STATIC_CFLAGS_OTHER} ${libcurl_STATIC_CFLAGS_OTHER} - ${sqlite3_STATIC_CFLAGS_OTHER}) - else() - target_link_libraries( - ${target} PRIVATE PkgConfig::openssl PkgConfig::libcurl - PkgConfig::sqlite3) - endif() -endfunction() - # Common setup for a GGL module function(ggl_init_module name) # TODO: special-case the socket permissions and directory for ggipcd @@ -343,7 +317,6 @@ function(ggl_init_module name) target_include_directories(${name} PRIVATE ${COMP_ARG_INCDIRS}) target_include_directories(${name} SYSTEM INTERFACE ${COMP_ARG_INCDIRS}) target_link_libraries(${name} PRIVATE ${COMP_ARG_LIBS}) - setup_static_linking(${name}) endif() if(GGL_SYSTEMD_SERVICE_BUILD) @@ -370,7 +343,6 @@ function(ggl_init_module name) target_link_libraries(${bin_name}-bin PRIVATE ${name}) endif() target_link_libraries(${bin_name}-bin PRIVATE ${COMP_ARG_LIBS}) - setup_static_linking(${bin_name}-bin) if(NOT has_argp) target_link_libraries(${bin_name}-bin PRIVATE argp) endif()