Skip to content

Commit

Permalink
Replace RHEL 7 with CBL-Mariner (#1373)
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyONeal authored Mar 28, 2024
1 parent de85ec9 commit c729404
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 105 deletions.
30 changes: 17 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,27 @@ if(MSVC AND NOT COMMAND target_precompile_headers)
endif()

if(VCPKG_EMBED_GIT_SHA)
find_package(Git REQUIRED)
execute_process(
COMMAND "${GIT_EXECUTABLE}" status --porcelain=v1
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
OUTPUT_VARIABLE VCPKG_GIT_STATUS
OUTPUT_STRIP_TRAILING_WHITESPACE
)

if(VCPKG_GIT_STATUS STREQUAL "")
if(DEFINED VCPKG_VERSION)
message(STATUS "Using supplied version SHA ${VCPKG_VERSION}.")
else()
find_package(Git REQUIRED)
execute_process(
COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD
COMMAND "${GIT_EXECUTABLE}" status --porcelain=v1
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
OUTPUT_VARIABLE VCPKG_VERSION
OUTPUT_VARIABLE VCPKG_GIT_STATUS
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else()
message(WARNING "Skipping embedding SHA due to local changes.")

if(VCPKG_GIT_STATUS STREQUAL "")
execute_process(
COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
OUTPUT_VARIABLE VCPKG_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else()
message(WARNING "Skipping embedding SHA due to local changes.")
endif()
endif()
endif()

Expand Down
69 changes: 38 additions & 31 deletions azure-pipelines/signing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ parameters:
values:
- 'GitHub and NuGet'
- 'NuGet Only'
- 'None'
variables:
- group: vcpkg Terrapin URLs
- name: TeamName
Expand Down Expand Up @@ -201,32 +202,36 @@ jobs:
inputs:
failOnStderr: true
script: |
cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$VCPKG_BASE_VERSION" "-DVCPKG_STANDALONE_BUNDLE_SHA=$VCPKG_STANDALONE_BUNDLE_SHA" -B "$(Build.BinariesDirectory)/build" 2>&1
cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$VCPKG_BASE_VERSION" "-DVCPKG_VERSION=$(Build.SourceVersion)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$VCPKG_STANDALONE_BUNDLE_SHA" -B "$(Build.BinariesDirectory)/build" 2>&1
make -j 8 -C "$(Build.BinariesDirectory)/build"
zip -j "$(Build.ArtifactStagingDirectory)/vcpkg-macos.zip" "$(Build.BinariesDirectory)/build/vcpkg"
- task: PublishBuildArtifacts@1
displayName: "Publish Unsigned MacOS Binary"
inputs:
ArtifactName: 'staging'
publishLocation: 'Container'
- job: rhel_build
displayName: 'glibc (RHEL) Build'
- job: glibc_build
displayName: 'glibc Build'
dependsOn:
- arch_independent
pool:
name: 'vcpkg-rhel-7-5'
name: 'vcpkg-mariner-1espt'
variables:
VCPKG_STANDALONE_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_STANDALONE_BUNDLE_SHA'] ]
VCPKG_BASE_VERSION: $[ dependencies.arch_independent.outputs['versions.VCPKG_BASE_VERSION'] ]
steps:
- bash: |
az login --identity --username 29a4d3e7-c7d5-41c7-b5a0-fee8cf466371
az acr login --name vcpkgdockercontainers
displayName: 'Set up managed identity'
- task: CmdLine@2
displayName: "Build vcpkg with CMake"
displayName: "Build vcpkg in Mariner with Ubuntu 16.04 Libraries"
inputs:
failOnStderr: true
failOnStderr: false
script: |
scl enable devtoolset-9 'cmake3 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++" "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$VCPKG_BASE_VERSION" "-DVCPKG_STANDALONE_BUNDLE_SHA=$VCPKG_STANDALONE_BUNDLE_SHA" -B "$(Build.BinariesDirectory)/build"' 2>&1
make -j 4 -C "$(Build.BinariesDirectory)/build"
mv "$(Build.BinariesDirectory)/build/vcpkg" "$(Build.ArtifactStagingDirectory)/vcpkg-glibc"
mkdir -p "$(Agent.TempDirectory)/build"
docker run --rm --mount "type=bind,source=$(Build.Repository.LocalPath),target=/source,readonly" --mount "type=bind,source=$(Agent.TempDirectory)/build,target=/build" vcpkgdockercontainers.azurecr.io/vcpkg/vcpkg-linux:2024-03-21 sh -c "cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=/source/azure-pipelines/vcpkg-linux/toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url) -DVCPKG_FMT_URL=$(fmt-tarball-url) -DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA) -DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION) -DVCPKG_VERSION=$(Build.SourceVersion) -S /source -B /build 2>&1 && ninja -C /build"
mv "$(Agent.TempDirectory)/build/vcpkg" "$(Build.ArtifactStagingDirectory)/vcpkg-glibc"
- task: PublishBuildArtifacts@1
displayName: "Publish Unsigned glibc Binary"
inputs:
Expand All @@ -235,25 +240,25 @@ jobs:
- job: muslc_build
displayName: 'muslc (Alpine) Build'
pool:
name: 'vcpkg-mariner-docker-gen1'
name: 'vcpkg-mariner-1espt'
dependsOn:
- arch_independent
variables:
VCPKG_STANDALONE_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_STANDALONE_BUNDLE_SHA'] ]
VCPKG_BASE_VERSION: $[ dependencies.arch_independent.outputs['versions.VCPKG_BASE_VERSION'] ]
steps:
- bash: |
az login --identity
az login --identity --username 29a4d3e7-c7d5-41c7-b5a0-fee8cf466371
az acr login --name vcpkgdockercontainers
displayName: 'Set up managed identity'
- task: CmdLine@2
displayName: "Build vcpkg in Alpine"
inputs:
failOnStderr: false
script: |
docker build --build-arg "FMT_TARBALL_URL=$(fmt-tarball-url)" --build-arg "CMAKERC_TARBALL_URL=$(cmakerc-tarball-url)" --build-arg "VCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA)" --build-arg "VCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION)" -t vcpkg-muslc-image -f azure-pipelines/vcpkg-alpine/Dockerfile . || exit 1
docker create -ti --name vcpkg-muslc-container vcpkg-muslc-image sh || exit 1
docker cp vcpkg-muslc-container:/build/vcpkg "$(Build.ArtifactStagingDirectory)/vcpkg-muslc" || exit 1
mkdir -p "$(Agent.TempDirectory)/build"
docker run --rm --mount "type=bind,source=$(Build.Repository.LocalPath),target=/source,readonly" --mount "type=bind,source=$(Agent.TempDirectory)/build,target=/build" vcpkgdockercontainers.azurecr.io/vcpkg/vcpkg-alpine:3.16 sh -c "cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_CXX_FLAGS=\"-static -s -static-libgcc -static-libstdc++\" -DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url) -DVCPKG_FMT_URL=$(fmt-tarball-url) -DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA) -DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION) -DVCPKG_VERSION=$(Build.SourceVersion) -S /source -B /build 2>&1 && ninja -C /build"
mv "$(Agent.TempDirectory)/build/vcpkg" "$(Build.ArtifactStagingDirectory)/vcpkg-muslc"
- task: PublishBuildArtifacts@1
displayName: "Publish Unsigned muslc Binary"
inputs:
Expand All @@ -265,7 +270,7 @@ jobs:
dependsOn:
- arch_independent
- macos_build
- rhel_build
- glibc_build
- muslc_build
pool:
name: 'VSEngSS-MicroBuild2022-1ES'
Expand All @@ -285,7 +290,7 @@ jobs:
script: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64
cmake.exe --version
cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA)" -B "$(Build.BinariesDirectory)\amd64"
cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION)" "-DVCPKG_VERSION=$(Build.SourceVersion)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA)" -B "$(Build.BinariesDirectory)\amd64"
ninja.exe -C "$(Build.BinariesDirectory)\amd64"
- task: CmdLine@2
displayName: "Build vcpkg arm64 with CMake"
Expand All @@ -294,7 +299,7 @@ jobs:
script: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64
cmake.exe --version
cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_PDB_SUFFIX="-arm64" "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA)" -B "$(Build.BinariesDirectory)\arm64"
cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_PDB_SUFFIX="-arm64" "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION)" "-DVCPKG_VERSION=$(Build.SourceVersion)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA)" -B "$(Build.BinariesDirectory)\arm64"
ninja.exe -C "$(Build.BinariesDirectory)\arm64"
- task: CodeQL3000Finalize@0
displayName: 'CodeQL Finalize'
Expand Down Expand Up @@ -471,21 +476,23 @@ jobs:
ArtifactName: 'Drop'
publishLocation: 'Container'
# Publish everything to VS Insertion
- task: NuGetCommand@2
displayName: 'NuGet publish for VS Insertion'
condition: and(eq(variables.SignType, 'real'), succeeded())
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/vs-insertion/drop/VS.Redist.Vcpkg.amd64.1.0.0-$(VCPKG_FULL_VERSION).nupkg'
publishVstsFeed: '97a41293-2972-4f48-8c0e-05493ae82010'
- ${{ if or(eq(parameters.PublishTo, 'GitHub and NuGet'),eq(parameters.PublishTo, 'NuGet Only')) }}:
- task: NuGetCommand@2
displayName: 'NuGet publish for VS Insertion'
condition: and(eq(variables.SignType, 'real'), succeeded())
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/vs-insertion/drop/VS.Redist.Vcpkg.amd64.1.0.0-$(VCPKG_FULL_VERSION).nupkg'
publishVstsFeed: '97a41293-2972-4f48-8c0e-05493ae82010'
# Publish symbols
- task: MicroBuildArchiveSymbols@4
displayName: 'Upload Symbols'
inputs:
SymbolsFeatureName: 'vcpkg'
SymbolsProject: 'VS'
SymbolsAgentPath: '$(Build.ArtifactStagingDirectory)\symbols'
azureSubscription: 'Symbols Upload (DevDiv)'
- ${{ if ne(parameters.PublishTo, 'None') }}:
- task: MicroBuildArchiveSymbols@4
displayName: 'Upload Symbols'
inputs:
SymbolsFeatureName: 'vcpkg'
SymbolsProject: 'VS'
SymbolsAgentPath: '$(Build.ArtifactStagingDirectory)\symbols'
azureSubscription: 'Symbols Upload (DevDiv)'
# Publish everything to a GitHub Release
- ${{ if eq(parameters.PublishTo, 'GitHub and NuGet') }}:
- task: DownloadSecureFile@1
Expand Down
16 changes: 1 addition & 15 deletions azure-pipelines/vcpkg-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
FROM vcpkgdockercontainers.azurecr.io/vcpkg/alpine:3.11
FROM vcpkgdockercontainers.azurecr.io/vcpkg/alpine:3.16

RUN apk add alpine-sdk cmake ninja git curl tar gzip zip

COPY . /source

ARG FMT_TARBALL_URL

ARG CMAKERC_TARBALL_URL

ARG VCPKG_BASE_VERSION

ARG VCPKG_STANDALONE_BUNDLE_SHA

RUN cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_CXX_FLAGS="-static -s -static-libgcc -static-libstdc++" "-DVCPKG_BASE_VERSION=$VCPKG_BASE_VERSION" "-DVCPKG_STANDALONE_BUNDLE_SHA=$VCPKG_STANDALONE_BUNDLE_SHA" "-DVCPKG_FMT_URL=$FMT_TARBALL_URL" "-DVCPKG_CMAKERC_URL=$CMAKERC_TARBALL_URL" -S /source -B /build 2>&1

RUN ninja -C build
58 changes: 58 additions & 0 deletions azure-pipelines/vcpkg-linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This infrastructure is adapted from that the .NET team uses, see
# https://github.com/dotnet/dotnet-buildtools-prereqs-docker
# and
# https://github.com/dotnet/runtime/blob/main/docs/workflow/building/coreclr/linux-instructions.md
FROM mcr.microsoft.com/cbl-mariner/base/core:2.0

RUN tdnf install -y \
# Common utilities
ca-certificates \
git \
tar \
curl \
# Build tools
binutils \
cmake \
ninja-build \
# Rootfs build dependencies
bzip2-devel \
debootstrap \
libarchive-devel \
openssl-devel

# Obtain ubuntu package signing key (for use by debootstrap)
# 1. Download the ubuntu keyrings
RUN curl -L -o ubuntu-keyring_2021.03.26.tar.gz https://mirrors.edge.kernel.org/ubuntu/pool/main/u/ubuntu-keyring/ubuntu-keyring_2021.03.26.tar.gz && \
# 2. Check that they have the correct SHA
echo "492eed5c06408c6f632577adb0796130af5d6542013ef418f47187a209e49bb1 ubuntu-keyring_2021.03.26.tar.gz" | sha256sum -c && \
tar xf ubuntu-keyring_2021.03.26.tar.gz && \
rm ubuntu-keyring_2021.03.26.tar.gz && \
# 3. Install the needed keyring and delete the rest
pushd ubuntu-keyring-2021.03.26 && \
mkdir -p /usr/share/keyrings && \
mv keyrings/ubuntu-archive-keyring.gpg /usr/share/keyrings && \
popd && \
rm -r ubuntu-keyring-2021.03.26

# Build the 'crossrootfs'
# Note that we only need libstdc++-9-dev rather than all of g++-9, but choosing g++-9
# gets other optional dependencies to agree with g++-9 rather than older gccs
RUN debootstrap "--variant=minbase" --force-check-gpg --arch amd64 xenial /crossrootfs/x64 http://archive.ubuntu.com/ubuntu/
COPY sources.list .
RUN chroot /crossrootfs/x64 apt-get clean && \
cp /etc/resolv.conf /crossrootfs/x64/etc/resolv.conf && \
cp sources.list /crossrootfs/x64/etc/apt/sources.list && \
chroot /crossrootfs/x64 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 60C317803A41BA51845E371A1E9377A2BA9EF27F && \
chroot /crossrootfs/x64 apt-get update -o Acquire::CompressionTypes::Order::=gz

# Repeated runs of apt-get install workaround 'hash sum mismatch' errors
# (This is also why these are a separate cache layer)
RUN chroot /crossrootfs/x64 apt-get install -y build-essential symlinks "g++-9" || \
chroot /crossrootfs/x64 apt-get install -y build-essential symlinks "g++-9" || \
chroot /crossrootfs/x64 apt-get install -y build-essential symlinks "g++-9" || \
chroot /crossrootfs/x64 apt-get install -y build-essential symlinks "g++-9" || \
chroot /crossrootfs/x64 apt-get install -y build-essential symlinks "g++-9" || \
chroot /crossrootfs/x64 apt-get install -y build-essential symlinks "g++-9" || \
chroot /crossrootfs/x64 apt-get install -y build-essential symlinks "g++-9" && \
chroot /crossrootfs/x64 symlinks -cr /usr && \
chroot /crossrootfs/x64 apt-get clean
14 changes: 14 additions & 0 deletions azure-pipelines/vcpkg-linux/sources.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
deb http://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu xenial main
deb-src http://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu xenial main

deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted universe

deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe

deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted
deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted

deb http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
26 changes: 26 additions & 0 deletions azure-pipelines/vcpkg-linux/toolchain.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
set(CMAKE_SYSTEM_NAME Linux)
set(LINUX 1)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(CMAKE_SYSROOT "/crossrootfs/x64")
set(C_HEADER_ARGS "-B/crossrootfs/x64/usr/lib/x86_64-linux-gnu/ -isystem /crossrootfs/x64/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed -isystem /crossrootfs/x64/usr/lib/gcc/x86_64-linux-gnu/9/include -isystem /crossrootfs/x64/usr/include/x86_64-linux-gnu -isystem /crossrootfs/x64/usr/include")
set(CMAKE_C_FLAGS_INIT "${C_HEADER_ARGS} -static -s -static-libgcc -nostdinc")
set(CMAKE_CXX_FLAGS_INIT "-isystem /crossrootfs/x64/usr/include/x86_64-linux-gnu/c++/9 -isystem /crossrootfs/x64/usr/include/c++/9 ${C_HEADER_ARGS} -static -s -static-libgcc -nostdinc -static-libstdc++ -L/crossrootfs/x64/usr/lib/gcc/x86_64-linux-gnu/9/")
set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "/crossrootfs/x64/usr")
set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "/crossrootfs/x64/usr")
set(CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN "/crossrootfs/x64/usr")
function(add_toolchain_linker_flag Flag)
set("CMAKE_EXE_LINKER_FLAGS_INIT" "${CMAKE_EXE_LINKER_FLAGS_INIT} ${Flag}" PARENT_SCOPE)
set("CMAKE_SHARED_LINKER_FLAGS_INIT" "${CMAKE_SHARED_LINKER_FLAGS_INIT} ${Flag}" PARENT_SCOPE)
endfunction()

add_toolchain_linker_flag("-Wl,--rpath-link=/crossrootfs/x64/lib/x86_64-linux-gnu")
add_toolchain_linker_flag("-Wl,--rpath-link=/crossrootfs/x64/usr/lib/x86_64-linux-gnu")

set(CMAKE_C_COMPILER /usr/bin/gcc)
set(CMAKE_CXX_COMPILER /usr/bin/g++)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
29 changes: 0 additions & 29 deletions azure-pipelines/vcpkg-rhel-7-5.json

This file was deleted.

17 changes: 0 additions & 17 deletions azure-pipelines/vcpkg-ubuntu-20-04-docker.json

This file was deleted.

0 comments on commit c729404

Please sign in to comment.