Skip to content

Commit 3f961a2

Browse files
committed
Remove dependency on pipeline-logging-functions.sh
1 parent 7d751bb commit 3f961a2

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

eng/common/native/init-compiler.sh

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@
44
#
55
# NOTE: some scripts source this file and rely on stdout being empty, make sure to not output anything here!
66

7-
if [ "$#" -lt 3 ]; then
7+
if [ "$#" -lt 2 ]; then
88
echo "Usage..."
9-
echo "init-compiler.sh <script directory> <Architecture> <compiler>"
10-
echo "Specify the script directory."
9+
echo "init-compiler.sh <Architecture> <compiler>"
1110
echo "Specify the target architecture."
1211
echo "Specify the name of compiler (clang or gcc)."
1312
exit 1
1413
fi
1514

16-
nativescriptroot="$1"
17-
build_arch="$2"
18-
compiler="$3"
15+
build_arch="$1"
16+
compiler="$2"
1917

2018
case "$compiler" in
2119
clang*|-clang*|--clang*)
@@ -41,8 +39,6 @@ esac
4139

4240
cxxCompiler="$compiler++"
4341

44-
. "$nativescriptroot"/../pipeline-logging-functions.sh
45-
4642
# clear the existing CC and CXX from environment
4743
CC=
4844
CXX=
@@ -83,23 +79,23 @@ if [ -z "$CLR_CC" ]; then
8379
if [ -z "$majorVersion" ]; then
8480
if command -v "$compiler" > /dev/null; then
8581
if [ "$(uname)" != "Darwin" ]; then
86-
Write-PipelineTelemetryError -category "Build" -type "warning" "Specific version of $compiler not found, falling back to use the one in PATH."
82+
echo "Warning: Specific version of $compiler not found, falling back to use the one in PATH."
8783
fi
8884
CC="$(command -v "$compiler")"
8985
CXX="$(command -v "$cxxCompiler")"
9086
else
91-
Write-PipelineTelemetryError -category "Build" "No usable version of $compiler found."
87+
echo "No usable version of $compiler found."
9288
exit 1
9389
fi
9490
else
9591
if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then
9692
if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then
9793
if command -v "$compiler" > /dev/null; then
98-
Write-PipelineTelemetryError -category "Build" -type "warning" "Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH."
94+
echo "Warning: Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH."
9995
CC="$(command -v "$compiler")"
10096
CXX="$(command -v "$cxxCompiler")"
10197
else
102-
Write-PipelineTelemetryError -category "Build" "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
98+
echo "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
10399
exit 1
104100
fi
105101
fi
@@ -108,7 +104,7 @@ if [ -z "$CLR_CC" ]; then
108104
else
109105
desired_version="$(check_version_exists "$majorVersion" "$minorVersion")"
110106
if [ "$desired_version" = "-1" ]; then
111-
Write-PipelineTelemetryError -category "Build" "Could not find specific version of $compiler: $majorVersion $minorVersion."
107+
echo "Could not find specific version of $compiler: $majorVersion $minorVersion."
112108
exit 1
113109
fi
114110
fi
@@ -120,15 +116,15 @@ if [ -z "$CLR_CC" ]; then
120116
fi
121117
else
122118
if [ ! -f "$CLR_CC" ]; then
123-
Write-PipelineTelemetryError -category "Build" "CLR_CC is set but path '$CLR_CC' does not exist"
119+
echo "CLR_CC is set but path '$CLR_CC' does not exist"
124120
exit 1
125121
fi
126122
CC="$CLR_CC"
127123
CXX="$CLR_CXX"
128124
fi
129125

130126
if [ -z "$CC" ]; then
131-
Write-PipelineTelemetryError -category "Build" "Unable to find $compiler."
127+
echo "Unable to find $compiler."
132128
exit 1
133129
fi
134130

src/Microsoft.DotNet.CMake.Sdk/build/Microsoft.DotNet.CMake.Sdk.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
<PropertyGroup>
124124
<_NativeScriptsDir>$([MSBuild]::NormalizeDirectory('$(RepositoryEngineeringDir)', 'common', 'native'))</_NativeScriptsDir>
125125
<CMakeCompilerSearchScript>
126-
. &quot;$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$(_NativeScriptsDir)/init-compiler.sh'))&quot; &quot;$(_NativeScriptsDir)&quot; &quot;$(Platform)&quot; &quot;$(CMakeCompilerToolchain)&quot;
126+
. &quot;$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$(_NativeScriptsDir)/init-compiler.sh'))&quot; &quot;$(Platform)&quot; &quot;$(CMakeCompilerToolchain)&quot;
127127
</CMakeCompilerSearchScript>
128128
</PropertyGroup>
129129
</Target>

0 commit comments

Comments
 (0)