Skip to content

Commit 2cec6d2

Browse files
committed
Convert tabs to spaces and unix2dos
1 parent 2c5c636 commit 2cec6d2

File tree

7 files changed

+12
-177
lines changed

7 files changed

+12
-177
lines changed

buildscripts/grpc-java-artifacts/Dockerfile.multiarch.base

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,5 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
1616

1717
RUN curl -Ls https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-linux-x86_64.tar.gz | \
1818
tar xz -C /var/local
19-
20-
# Install Maven
21-
RUN curl -Ls https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz | \
22-
tar xz -C /var/local
23-
ENV PATH /var/local/cmake-3.26.3-linux-x86_64/bin:/var/local/apache-maven-3.8.8/bin:$PATH
19+
ENV PATH /var/local/cmake-3.26.3-linux-x86_64/bin:$PATH
2420

buildscripts/grpc-java-artifacts/Dockerfile.ubuntu2004.base

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,4 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
1515

1616
RUN curl -Ls https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-linux-x86_64.tar.gz | \
1717
tar xz -C /var/local
18-
19-
# Install Maven
20-
RUN curl -Ls https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz | \
21-
tar xz -C /var/local
22-
ENV PATH /var/local/cmake-3.26.3-linux-x86_64/bin:/var/local/apache-maven-3.8.8/bin:$PATH
18+
ENV PATH /var/local/cmake-3.26.3-linux-x86_64/bin:$PATH

buildscripts/kokoro/windows32.bat

Lines changed: 0 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +0,0 @@
1-
@rem ##########################################################################
2-
@rem
3-
@rem Runs tests and then builds artifacts to %WORKSPACE%\artifacts\
4-
@rem
5-
@rem ##########################################################################
6-
7-
type c:\VERSION
8-
9-
@rem Enter repo root
10-
cd /d %~dp0\..\..
11-
12-
set WORKSPACE=T:\src\github\grpc-java
13-
set ESCWORKSPACE=%WORKSPACE:\=\\%
14-
15-
16-
@rem Clear JAVA_HOME to prevent a different Java version from being used
17-
set JAVA_HOME=
18-
19-
mkdir grpc-java-helper32
20-
cd grpc-java-helper32
21-
call "%VS170COMNTOOLS%\..\..\VC\Auxiliary\Build\vcvars32.bat" || exit /b 1
22-
call "%WORKSPACE%\buildscripts\make_dependencies.bat" || exit /b 1
23-
24-
cd "%WORKSPACE%"
25-
26-
SET TARGET_ARCH=x86_32
27-
SET FAIL_ON_WARNINGS=true
28-
SET PROTOBUF_VER=22.5
29-
SET PKG_CONFIG_PATH=%ESCWORKSPACE%\\grpc-java-helper32\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\lib\\pkgconfig
30-
SET VC_PROTOBUF_LIB_PATHS=%ESCWORKSPACE%\\grpc-java-helper32\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\lib
31-
SET VC_PROTOBUF_INCLUDE=%ESCWORKSPACE%\\grpc-java-helper32\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\include
32-
call :Get_Libs
33-
SET GRADLE_FLAGS=-PtargetArch=%TARGET_ARCH% -PfailOnWarnings=%FAIL_ON_WARNINGS% -PvcProtobufLibPaths=%VC_PROTOBUF_LIB_PATHS% -PvcProtobufLibs=%VC_PROTOBUF_LIBS% -PvcProtobufInclude=%VC_PROTOBUF_INCLUDE% -PskipAndroid=true
34-
SET GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx1g'"
35-
36-
cmd.exe /C "%WORKSPACE%\gradlew.bat %GRADLE_FLAGS% build"
37-
set GRADLEEXIT=%ERRORLEVEL%
38-
39-
@rem Rename test results .xml files to format parsable by Kokoro
40-
@echo off
41-
for /r %%F in (TEST-*.xml) do (
42-
mkdir "%%~dpnF"
43-
move "%%F" "%%~dpnF\sponge_log.xml" >NUL
44-
)
45-
@echo on
46-
47-
IF NOT %GRADLEEXIT% == 0 (
48-
exit /b %GRADLEEXIT%
49-
)
50-
51-
@rem make sure no daemons have any files open
52-
cmd.exe /C "%WORKSPACE%\gradlew.bat --stop"
53-
54-
cmd.exe /C "%WORKSPACE%\gradlew.bat %GRADLE_FLAGS% -Dorg.gradle.parallel=false -PrepositoryDir=%WORKSPACE%\artifacts clean grpc-compiler:build grpc-compiler:publish" || exit /b 1
55-
56-
goto :eof
57-
:Get_Libs
58-
SetLocal EnableDelayedExpansion
59-
set "libs_list="
60-
for /f "tokens=*" %%a in ('pkg-config --libs protobuf') do (
61-
for %%b in (%%a) do (
62-
set lib=%%b
63-
set libfirst2char=!lib:~0,2!
64-
if !libfirst2char!==-l (
65-
@rem remove the leading -l
66-
set lib=!lib:~2!
67-
@rem remove spaces
68-
set lib=!lib: =!
69-
@rem Because protobuf is specified as libprotobuf and elsewhere
70-
if !lib! NEQ protobuf (
71-
set lib=!lib!.lib
72-
if "!libs_list!"=="" (
73-
set libs_list=!lib!
74-
) else (
75-
set libs_list=!libs_list!,!lib!
76-
)
77-
)
78-
)
79-
)
80-
)
81-
EndLocal & set "VC_PROTOBUF_LIBS=%libs_list%"
82-
exit /b 0
83-

buildscripts/kokoro/windows64.bat

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +0,0 @@
1-
@rem ##########################################################################
2-
@rem
3-
@rem Builds artifacts for x86_64 into %WORKSPACE%\artifacts\
4-
@rem
5-
@rem ##########################################################################
6-
7-
type c:\VERSION
8-
9-
@rem Enter repo root
10-
cd /d %~dp0\..\..
11-
12-
set WORKSPACE=T:\src\github\grpc-java
13-
set ESCWORKSPACE=%WORKSPACE:\=\\%
14-
15-
@rem Clear JAVA_HOME to prevent a different Java version from being used
16-
set JAVA_HOME=
17-
18-
mkdir grpc-java-helper64
19-
cd grpc-java-helper64
20-
call "%VS170COMNTOOLS%\..\..\VC\Auxiliary\Build\vcvars64.bat" || exit /b 1
21-
call "%WORKSPACE%\buildscripts\make_dependencies.bat" || exit /b 1
22-
23-
cd "%WORKSPACE%"
24-
25-
SET TARGET_ARCH=x86_64
26-
SET FAIL_ON_WARNINGS=true
27-
SET PROTOBUF_VER=22.5
28-
SET PKG_CONFIG_PATH=%ESCWORKSPACE%\\grpc-java-helper64\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\lib\\pkgconfig
29-
SET VC_PROTOBUF_LIB_PATHS=%ESCWORKSPACE%\\grpc-java-helper64\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\lib
30-
SET VC_PROTOBUF_INCLUDE=%ESCWORKSPACE%\\grpc-java-helper64\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\include
31-
call :Get_Libs
32-
SET GRADLE_FLAGS=-PtargetArch=%TARGET_ARCH% -PfailOnWarnings=%FAIL_ON_WARNINGS% -PvcProtobufLibPaths=%VC_PROTOBUF_LIB_PATHS% -PvcProtobufLibs=%VC_PROTOBUF_LIBS% -PvcProtobufInclude=%VC_PROTOBUF_INCLUDE% -PskipAndroid=true
33-
SET GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx1g'"
34-
35-
@rem make sure no daemons have any files open
36-
cmd.exe /C "%WORKSPACE%\gradlew.bat --stop"
37-
38-
cmd.exe /C "%WORKSPACE%\gradlew.bat %GRADLE_FLAGS% -Dorg.gradle.parallel=false -PrepositoryDir=%WORKSPACE%\artifacts grpc-compiler:clean grpc-compiler:build grpc-compiler:publish" || exit /b 1
39-
40-
goto :eof
41-
:Get_Libs
42-
SetLocal EnableDelayedExpansion
43-
set "libs_list="
44-
for /f "tokens=*" %%a in ('pkg-config --libs protobuf') do (
45-
for %%b in (%%a) do (
46-
set lib=%%b
47-
set libfirst2char=!lib:~0,2!
48-
if !libfirst2char!==-l (
49-
@rem remove the leading -l
50-
set lib=!lib:~2!
51-
@rem remove spaces
52-
set lib=!lib: =!
53-
@rem Because protobuf is specified as libprotobuf and elsewhere
54-
if !lib! NEQ protobuf (
55-
set lib=!lib!.lib
56-
if "!libs_list!"=="" (
57-
set libs_list=!lib!
58-
) else (
59-
set libs_list=!libs_list!,!lib!
60-
)
61-
)
62-
)
63-
)
64-
)
65-
EndLocal & set "VC_PROTOBUF_LIBS=%libs_list%"
66-
exit /b 0
67-

buildscripts/make_dependencies.bat

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
echo on
2-
@rem set PROTOBUF_VER=21.7
31
choco install -y pkgconfiglite
42
choco install -y openjdk --version=17.0
53
set JAVA_HOME="c:\Program Files\OpenJDK\jdk-17"
64
set PATH=%PATH%;"c:\Program Files\OpenJDK\jdk-17\bin"
75
set PROTOBUF_VER=22.5
86
set ABSL_VERSION=20230125.4
7+
set CMAKE_NAME=cmake-3.26.3-windows-x86_64
98

109
if not exist "protobuf-%PROTOBUF_VER%\build\Release\" (
1110
call :installProto || exit /b 1
@@ -20,7 +19,6 @@ goto :eof
2019

2120
where /q cmake
2221
if not ERRORLEVEL 1 goto :hasCmake
23-
set CMAKE_NAME=cmake-3.26.3-windows-x86_64
2422
if not exist "%CMAKE_NAME%" (
2523
call :installCmake || exit /b 1
2624
)
@@ -54,8 +52,8 @@ for /f "tokens=4 delims=\" %%a in ("%VCINSTALLDIR%") do (
5452
for /f "tokens=1 delims=." %%a in ("%VisualStudioVersion%") do (
5553
SET visual_studio_major_version=%%a
5654
)
57-
cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=%cd%\protobuf-%PROTOBUF_VER% -DCMAKE_PREFIX_PATH=%cd%\protobuf-%PROTOBUF_VER% -G "Visual Studio %visual_studio_major_version% %VC_YEAR%" %CMAKE_VSARCH% ..
58-
cmake --build . --config Release --target install
55+
cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=%cd%\protobuf-%PROTOBUF_VER% -DCMAKE_PREFIX_PATH=%cd%\protobuf-%PROTOBUF_VER% -G "Visual Studio %visual_studio_major_version% %VC_YEAR%" %CMAKE_VSARCH% .. || exit /b 1
56+
cmake --build . --config Release --target install || exit /b 1
5957
popd
6058
goto :eof
6159

buildscripts/make_dependencies.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ else
3434
curl -Ls "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.tar.gz" | tar xz
3535
curl -Ls "https://github.com/abseil/abseil-cpp/archive/refs/tags/${ABSL_VERSION}.tar.gz" | tar xz
3636
rmdir "protobuf-$PROTOBUF_VERSION/third_party/abseil-cpp"
37-
os_name=$(uname -s)
3837
mv "abseil-cpp-$ABSL_VERSION" "protobuf-$PROTOBUF_VERSION/third_party/abseil-cpp"
3938
fi
4039
# the same source dir is used for 32 and 64 bit builds, so we need to clean stale data first

compiler/build.gradle

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ model {
111111
} else if (osdetector.os == "windows") {
112112
linker.args "-static", "-lprotoc", "-lprotobuf", "-static-libgcc", "-static-libstdc++",
113113
"-s"
114-
} else if (osdetector.arch == "ppcle_64") {
115-
linker.args "-Wl,-Bstatic", "-lprotoc", "-lprotobuf", "-Wl,-Bdynamic", "-lpthread", "-s"
116-
} else {
114+
} else if (osdetector.arch == "ppcle_64") {
115+
linker.args "-Wl,-Bstatic", "-lprotoc", "-lprotobuf", "-Wl,-Bdynamic", "-lpthread", "-s"
116+
} else {
117117
// Link protoc, protobuf, libgcc and libstdc++ statically.
118118
// Link other (system) libraries dynamically.
119119
// Clang under OSX doesn't support these options.
@@ -134,9 +134,6 @@ model {
134134
String libsList = rootProject.property('vcProtobufLibs') as String
135135
libsList.split(',').each() { lib -> linker.args.add(lib) }
136136
}
137-
if (rootProject.hasProperty('vcProtobufLibPaths')) {
138-
linker.args "/LIBPATH:${rootProject.vcProtobufLibPaths}"
139-
}
140137
}
141138
}
142139
}
@@ -245,12 +242,11 @@ def checkArtifacts = tasks.register("checkArtifacts") {
245242
if (ret.exitValue != 0) {
246243
throw new GradleException("dumpbin exited with " + ret.exitValue)
247244
}
248-
def dlls = os.toString() =~ /Image has the following dependencies:([\S\s]*)Summary/
249-
def second_dll = dlls[0][1].trim().split("\\s+")[1]
250-
if (second_dll != "KERNEL32.dll") {
251-
throw new Exception("unexpected dll deps: " + dlls[0][2]);
245+
def dlls_match_results = os.toString() =~ /Image has the following dependencies:([\S\s]*)Summary/
246+
def dlls = dlls_match_results[0][1].trim().split("\\s+").sort()
247+
if (dlls != ["KERNEL32.dll", "dbghelp.dll"]) {
248+
throw new Exception("unexpected dll deps: " + dlls);
252249
}
253-
254250
os.reset()
255251
ret = exec {
256252
executable 'dumpbin'

0 commit comments

Comments
 (0)