-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass native build args from top-level scripts #2071
Conversation
<_CoreClrBuildArg Condition="'$(ContinuousIntegrationBuild)' == 'true'" Include="-ci" /> | ||
<_CoreClrBuildArg Condition="'$(CrossBuild)' == 'true'" Include="-cross" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[IMO]
Now that all native build scripts share common arguments via:
runtime/eng/native/build-commons.sh
Lines 160 to 194 in e2325f3
usage() | |
{ | |
echo "Usage: $0 <options>" | |
echo "" | |
echo "Common Options:" | |
echo "" | |
echo "BuildArch can be: -arm, -armel, -arm64, -armel, x64, x86, -wasm" | |
echo "BuildType can be: -debug, -checked, -release" | |
echo "-bindir: output directory (defaults to $__ProjectRoot/artifacts)" | |
echo "-ci: indicates if this is a CI build." | |
echo "-clang: optional argument to build using clang in PATH (default)." | |
echo "-clangx.y: optional argument to build using clang version x.y." | |
echo "-cmakeargs: user-settable additional arguments passed to CMake." | |
echo "-configureonly: do not perform any builds; just configure the build." | |
echo "-cross: optional argument to signify cross compilation," | |
echo " will use ROOTFS_DIR environment variable if set." | |
echo "-gcc: optional argument to build using gcc in PATH." | |
echo "-gccx.y: optional argument to build using gcc version x.y." | |
echo "-msbuildonunsupportedplatform: build managed binaries even if distro is not officially supported." | |
echo "-ninja: target ninja instead of GNU make" | |
echo "-numproc: set the number of build processes." | |
echo "-portablebuild: pass -portablebuild=false to force a non-portable build." | |
echo "-skipconfigure: skip build configuration." | |
echo "-skipgenerateversion: disable version generation even if MSBuild is supported." | |
echo "-stripsymbols: skip native image generation." | |
echo "-verbose: optional argument to enable verbose build output." | |
echo "" | |
echo "Additional Options:" | |
echo "" | |
for i in "${!usage_list[@]}"; do | |
echo "${usage_list[${i}]}" | |
done | |
echo "" | |
exit 1 | |
} |
coreclr/coreclr.proj
, installer/corehost/build.proj
and libraries/Native/build-native.proj
into a common .props
file, to avoid three different approaches of doing exactly the same thing (coreclr: ItemGroup, installer: property concatenation and libraries: separate properties followed by concatenation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@janvorli, could you please give it a pass? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
@am11 thank you for spending time to figure out a cleaner solution to the problem of passing the argument with spaces. |
Add ability to pass
--cross
,--clangx.y
,--gccx.y
and--cmakeargs
to native scripts via top-levelbuild.sh
. e.g.Also address CR feedback from PRs #1753 and #1602 (in separate commits).