Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build-tools/automation/azure-pipelines-public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ stages:
workspace:
clean: all
variables:
CXX: g++-10
CC: gcc-10
CXX: g++-11
CC: gcc-11
steps:
- checkout: self
path: s/android
Expand All @@ -151,8 +151,8 @@ stages:

- script: |
sudo apt-get update
sudo apt-get install -y g++-10 gcc-10
displayName: install g++-10 and gcc-10
sudo apt-get install -y g++-11 gcc-11
displayName: install g++-11 and gcc-11

- template: /build-tools/automation/yaml-templates/build-linux-steps.yaml
parameters:
Expand Down
4 changes: 2 additions & 2 deletions build-tools/automation/yaml-templates/build-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ stages:
workspace:
clean: all
variables:
CXX: g++-10
CC: gcc-10
CXX: g++-11
CC: gcc-11
${{ if eq(parameters.use1ESTemplate, true) }}:
templateContext:
outputs:
Expand Down
2 changes: 1 addition & 1 deletion build-tools/scripts/generate-pinvoke-tables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ case ${HOST} in
if [ "${RUNNING_ON_CI}" == "no" ]; then
COMPILER="g++"
else
COMPILER="g++-10"
COMPILER="g++-11"
fi ;;

darwin)
Expand Down
20 changes: 16 additions & 4 deletions tools/fastdev/elfcleaner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# Set the minimum version of CMake that can be used
# To find the cmake version run
# $ cmake --version
cmake_minimum_required(VERSION 3.5)
# 3.20+ is required so policy CMP0128 is NEW and the C++ standard flag
# (e.g. -std=c++20) is always emitted; elf-cleaner.cpp uses std::counting_semaphore.
cmake_minimum_required(VERSION 3.20)

# Set the project name
project (elfcleaner C CXX)

set(CMAKE_CXX_STANDARD 17)
# Keep ELFCLEANER_VERSION, CMAKE_CXX_STANDARD, and the PACKAGE_NAME/
# PACKAGE_VERSION/COPYRIGHT compile definitions below in sync with
# external/termux-elf-cleaner/CMakeLists.txt.
set(ELFCLEANER_VERSION "3.0.1")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
set(CMAKE_CXX_EXTENSIONS OFF)

set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
Expand All @@ -25,9 +32,14 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -Wall")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -Wall")

set(ELFCLEANER_SOURCES
../../../external/termux-elf-cleaner/termux-elf-cleaner.cpp
../../../external/termux-elf-cleaner/elf-cleaner.cpp
)

# Add an executable
add_executable(elfcleaner ${ELFCLEANER_SOURCES})
target_compile_definitions(elfcleaner
PRIVATE "COPYRIGHT=\"Copyright (C) 2022-2024 Termux and contributors.\""
PRIVATE "PACKAGE_VERSION=\"${ELFCLEANER_VERSION}\""
PRIVATE "PACKAGE_NAME=\"termux-elf-cleaner\""
)
set_target_properties(elfcleaner PROPERTIES LINK_FLAGS_RELEASE -s)