@@ -16,9 +16,7 @@ setup_dirs()
16
16
{
17
17
echo Setting up directories for build
18
18
19
- mkdir -p " $__RootBinDir "
20
19
mkdir -p " $__BinDir "
21
- mkdir -p " $__LogsDir "
22
20
mkdir -p " $__IntermediatesDir "
23
21
}
24
22
@@ -29,11 +27,6 @@ clean()
29
27
echo Cleaning previous output for the selected configuration
30
28
rm -rf " $__BinDir "
31
29
rm -rf " $__IntermediatesDir "
32
-
33
- rm -rf " $__TestWorkingDir "
34
- rm -rf " $__TestIntermediatesDir "
35
-
36
- rm -rf " $__LogsDir /*_$__BuildOS__$__BuildArch__$__BuildType .*"
37
30
}
38
31
39
32
# Check the system to ensure the right pre-reqs are in place
@@ -49,16 +42,16 @@ check_prereqs()
49
42
hash clang-$__ClangMajorVersion .$__ClangMinorVersion 2> /dev/null || hash clang$__ClangMajorVersion$__ClangMinorVersion 2> /dev/null || hash clang 2> /dev/null || { echo >&2 " Please install clang before running this script" ; exit 1; }
50
43
}
51
44
52
- build_coreclr ()
45
+ build_corefx_native ()
53
46
{
54
47
# All set to commence the build
55
48
56
- echo " Commencing build of native components for $__BuildOS .$__BuildArch .$__BuildType "
49
+ echo " Commencing build of corefx native components for $__BuildOS .$__BuildArch .$__BuildType "
57
50
cd " $__IntermediatesDir "
58
51
59
52
# Regenerate the CMake solution
60
- echo " Invoking cmake with arguments: \" $__ProjectRoot \" $__CMakeArgs "
61
- " $__ProjectRoot /src/pal/tools/ gen-buildsys-clang.sh" " $__ProjectRoot " $__ClangMajorVersion $__ClangMinorVersion $__CMakeArgs
53
+ echo " Invoking cmake with arguments: \" $__ScriptDir \" $__CMakeArgs "
54
+ " $__ScriptDir / gen-buildsys-clang.sh" " $__ScriptDir " $__ClangMajorVersion $__ClangMinorVersion $__CMakeArgs
62
55
63
56
# Check that the makefiles were created.
64
57
@@ -75,19 +68,19 @@ build_coreclr()
75
68
else
76
69
NumProc=$(( $(getconf _NPROCESSORS_ONLN)+ 1 ))
77
70
fi
78
-
79
- # Build CoreCLR
71
+
72
+ # Build
80
73
81
74
echo " Executing make install -j $NumProc $__UnprocessedBuildArgs "
82
75
83
76
make install -j $NumProc $__UnprocessedBuildArgs
84
77
if [ $? != 0 ]; then
85
- echo " Failed to build coreclr components."
78
+ echo " Failed to build corefx native components."
86
79
exit 1
87
80
fi
88
81
}
89
82
90
- echo " Commencing CoreCLR Repo build"
83
+ echo " Commencing CoreFX Native build"
91
84
92
85
# Argument types supported by this script:
93
86
#
@@ -97,7 +90,10 @@ echo "Commencing CoreCLR Repo build"
97
90
# Set the default arguments for build
98
91
99
92
# Obtain the location of the bash script to figure out whether the root of the repo is.
100
- __ProjectRoot=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
93
+
94
+ __ScriptDir=" $( dirname " ${BASH_SOURCE[0]} " ) "
95
+ __ScriptDir=" $( cd $__ScriptDir && pwd ) "
96
+ __ProjectRoot=" $( cd $__ScriptDir && cd ../.. && pwd ) "
101
97
__BuildArch=x64
102
98
# Use uname to determine what the OS is.
103
99
OSName=$( uname -s)
@@ -127,18 +123,14 @@ case $OSName in
127
123
__BuildOS=Linux
128
124
;;
129
125
esac
130
- __MSBuildBuildArch=x64
131
126
__BuildType=Debug
132
127
__CMakeArgs=DEBUG
133
128
134
129
# Set the various build properties here so that CMake and MSBuild can pick them up
135
130
__ProjectDir=" $__ProjectRoot "
136
- __SourceDir=" $__ProjectDir /src"
137
- __PackagesDir=" $__ProjectDir /packages"
131
+ __SourceDir=" $__ScriptDir "
138
132
__RootBinDir=" $__ProjectDir /bin"
139
- __LogsDir=" $__RootBinDir /Logs"
140
133
__UnprocessedBuildArgs=
141
- __MSBCleanBuildArgs=
142
134
__CleanBuild=false
143
135
__VerboseBuild=false
144
136
__ClangMajorVersion=3
@@ -187,12 +179,8 @@ for i in "$@"
187
179
done
188
180
189
181
# Set the remaining variables based upon the determined build configuration
190
- __BinDir=" $__RootBinDir /Product/$__BuildOS .$__BuildArch .$__BuildType "
191
- __PackagesBinDir=" $__BinDir /.nuget"
192
- __ToolsDir=" $__RootBinDir /tools"
193
- __TestWorkingDir=" $__RootBinDir /tests/$__BuildOS .$__BuildArch .$__BuildType "
194
- __IntermediatesDir=" $__RootBinDir /obj/$__BuildOS .$__BuildArch .$__BuildType "
195
- __TestIntermediatesDir=" $__RootBinDir /tests/obj/$__BuildOS .$__BuildArch .$__BuildType "
182
+ __IntermediatesDir=" $__RootBinDir /obj/$__BuildOS .$__BuildArch .$__BuildType /Native"
183
+ __BinDir=" $__RootBinDir /$__BuildOS .$__BuildArch .$__BuildType /Native"
196
184
197
185
# Specify path to be set for CMAKE_INSTALL_PREFIX.
198
186
# This is where all built CoreClr libraries will copied to.
@@ -216,12 +204,12 @@ setup_dirs
216
204
217
205
check_prereqs
218
206
219
- # Build the coreclr ( native) components.
207
+ # Build the corefx native components.
220
208
221
- build_coreclr
209
+ build_corefx_native
222
210
223
211
# Build complete
224
212
225
- echo " Repo successfully built."
213
+ echo " CoreFX native components successfully built."
226
214
echo " Product binaries are available at $__BinDir "
227
215
exit 0
0 commit comments