set xds user agent name everywhere where grpc_csharp_ext is built (#26337)

* set xds user agent name everywhere where grpc_csharp_ext is built

* regenerate projects
pull/26476/head
Jan Tattermusch 4 years ago committed by GitHub
parent b5191d0930
commit 156edd687e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      CMakeLists.txt
  2. 3
      src/csharp/experimental/build_native_ext_for_android.sh
  3. 5
      src/csharp/experimental/build_native_ext_for_ios.sh
  4. 6
      templates/CMakeLists.txt.template
  5. 2
      tools/run_tests/artifacts/build_artifact_csharp.bat
  6. 1
      tools/run_tests/artifacts/build_artifact_csharp.sh
  7. 2
      tools/run_tests/helper_scripts/pre_build_csharp.bat
  8. 2
      tools/run_tests/helper_scripts/pre_build_csharp.sh

@ -272,6 +272,12 @@ else()
set(_gRPC_CORE_NOSTDCXX_FLAGS "")
endif()
if (gRPC_XDS_USER_AGENT_IS_CSHARP)
# The value of the defines needs to contain quotes.
# See https://github.com/grpc/grpc/blob/fbf32836a418cc84f58786700273b65cb9174e1d/src/core/ext/xds/xds_api.cc#L854
add_definitions("-DGRPC_XDS_USER_AGENT_NAME_SUFFIX=\"csharp\"" "-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX=\"2.39.0-dev\"")
endif()
include(cmake/abseil-cpp.cmake)
include(cmake/address_sorting.cmake)
include(cmake/benchmark.cmake)

@ -47,6 +47,7 @@ ${ANDROID_SDK_CMAKE} ../.. \
-DCMAKE_BUILD_TYPE=Release \
-DANDROID_PLATFORM=android-19 \
-DANDROID_ABI="${ANDROID_ABI}" \
-DANDROID_NDK="${ANDROID_NDK_PATH}"
-DANDROID_NDK="${ANDROID_NDK_PATH}" \
-DgRPC_XDS_USER_AGENT_IS_CSHARP=ON
make -j4 grpc_csharp_ext

@ -31,6 +31,11 @@ function build {
CPPFLAGS="-O2 -Wframe-larger-than=16384 -arch $ARCH -isysroot $(xcrun --sdk $SDK --show-sdk-path) -mios-version-min=9.0 -DPB_NO_PACKED_STRUCTS=1"
LDFLAGS="-arch $ARCH -isysroot $(xcrun --sdk $SDK --show-sdk-path) -Wl,ios_version_min=9.0"
# TODO(jtattermusch): Ideally we'd be setting build defines that correspond to using cmake's
# gRPC_XDS_USER_AGENT_IS_CSHARP option here, but since using XDS with C# on iOS is unlikely
# and gRPC C#'s support of iOS is only experimental, it's fair to skip that for now
# (which will result in XDS user agent language being "not specified" and that's ok
# since there are other circumstances in which it isn't set).
# TODO(jtattermusch): revisit the build arguments
make -j4 static_csharp \
VALID_CONFIG_ios_$ARCH="1" \

@ -318,6 +318,12 @@
set(_gRPC_CORE_NOSTDCXX_FLAGS "")
endif()
if (gRPC_XDS_USER_AGENT_IS_CSHARP)
# The value of the defines needs to contain quotes.
# See https://github.com/grpc/grpc/blob/fbf32836a418cc84f58786700273b65cb9174e1d/src/core/ext/xds/xds_api.cc#L854
add_definitions("-DGRPC_XDS_USER_AGENT_NAME_SUFFIX=\"csharp\"" "-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX=\"${settings.csharp_version}\"")
endif()
include(cmake/abseil-cpp.cmake)
include(cmake/address_sorting.cmake)
include(cmake/benchmark.cmake)

@ -35,7 +35,7 @@ if "%ARCHITECTURE%" == "x64" (
)
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %ARCHITECTURE%
cmake -G Ninja -DCMAKE_C_COMPILER="%MSVC_COMPILER%" -DCMAKE_CXX_COMPILER="%MSVC_COMPILER%" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON ../../.. || goto :error
cmake -G Ninja -DCMAKE_C_COMPILER="%MSVC_COMPILER%" -DCMAKE_CXX_COMPILER="%MSVC_COMPILER%" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON -DgRPC_XDS_USER_AGENT_IS_CSHARP=ON ../../.. || goto :error
cmake --build . --target grpc_csharp_ext
cd ..\..\..

@ -23,6 +23,7 @@ cd cmake/build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DgRPC_BACKWARDS_COMPATIBILITY_MODE=ON \
-DgRPC_BUILD_TESTS=OFF \
-DgRPC_XDS_USER_AGENT_IS_CSHARP=ON \
../..
make grpc_csharp_ext -j2

@ -28,7 +28,7 @@ cd build
mkdir %ARCHITECTURE%
cd %ARCHITECTURE%
cmake -G "Visual Studio 14 2015" -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON ../../.. || goto :error
cmake -G "Visual Studio 14 2015" -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON -DgRPC_XDS_USER_AGENT_IS_CSHARP=ON ../../.. || goto :error
cd ..\..\..\src\csharp

@ -21,7 +21,7 @@ cd "$(dirname "$0")/../../.."
mkdir -p cmake/build
cd cmake/build
cmake -DgRPC_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE="${MSBUILD_CONFIG}" ../..
cmake -DgRPC_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE="${MSBUILD_CONFIG}" -DgRPC_XDS_USER_AGENT_IS_CSHARP=ON ../..
cd ../../src/csharp

Loading…
Cancel
Save