summaryrefslogtreecommitdiff
path: root/build.sh
AgeCommit message (Collapse)AuthorFilesLines
2019-09-24[Tizen] Add support for GBSjunghyuk.park1-5/+5
2019-06-14Add a build option to skip building managed tools (#25171)Jarret Shook1-0/+5
This specifically will set __BuildManagedTools=0 and skip building R2RDump and runincontext.
2019-06-14Merge pull request #25138 from ↵Jarret Shook1-9/+13
jashook/write_pgo_opt_version_to_intermediates_dir Change how build.sh/build.cmd parse the PGO and IBC versions
2019-06-13Address PR feedback.jashook1-8/+11
2019-06-13Add ${__CommonMSBuildArgs} to pass buildtype and archjashook1-2/+2
2019-06-12Change how build.sh/build.cmd parse the PGO and IBC versionsjashook1-10/+11
This will reduce fragility in our build pipeline, by explicitely controlling the output of dotnet msbuild. It also unblocks the source-build effort, as source-build will write extra console output breaking our old parsing.
2019-06-12Address feedbackjashook1-1/+1
2019-06-11use nodeReuse:false in build.sh and build-test.sh.jashook1-1/+1
2019-06-10Add source-build hook for dotnet install (#24929)Jarret Shook1-8/+5
* Add source-build hook for dotnet install * Fix batch syntax * Address feedback * Use the correct returned variables: unix: _InitializeDotNetCli windows: DOTNET_TOOL_DIR * Remove changes to dotnet.cmd * Do not export, just use _InitializeDotNetCli
2019-06-03Fix armel tests build (#24678)Gleb Balykov1-19/+20
* Fix build-tests script for cross build and fix tests for armel * Handle case of -skipcrossgen for cross builds * Fix build error in case of cross builds when ROOTFS_DIR is not passed explicitly * Fix portable build parameter setup for armel tests build * Move force of non-portable build for armel from build.sh/build-test.sh to init-distro-rid.sh * Fix priority1 tests build for armel
2019-05-30Fix #24867 (#24870)Jarret Shook1-1/+1
Pre SDK 3.0, a project type that is not .csproj would not include Directory.Build.targets. Change empty.proj to empty.csproj to allow source build, which uses a 2.1 sdk to build, correctly import Directory.Build.targets.
2019-05-30Remove BuildTools from product build (#24841)Elinor Fung1-18/+8
* Remove BuildTools imports from product build * Split scripts for installing dotnet vs BuildTools
2019-05-28Use Arcade for native versioning (#24785)Elinor Fung1-6/+8
2019-05-23Fix restoring internal tools (#24750)Elinor Fung1-2/+2
2019-05-21Switch NuGet package build to use Arcade instead of BuildTools (#24619)Elinor Fung1-13/+22
2019-05-10Move EventProvider native layout to be driven by CMake configure (#24478)Jeremy Koritzinsky1-35/+2
* Generate eventpipe implementation as part of CMake configure. * Generate Etw provider as part of CMake configure. * First pass porting over lttng provider to cmake. * Fix up CMake Lttng provider generation. * Move Lttng provider into CMake tree. * Move dummy event provider to CMake * Move genEventing into the CMake tree. * Remove extraneous logging and unused python locator. * Clean up build.sh * Clean up genEventingTests.py * Add dependencies to enable more incremental builds (providers not fully incremental). * Convert to custom command and targets instead of at configure time. * Get each eventing target to incrementally build. * Fix incremental builds * Add missing dependencies on eventing headers. * PR Feedback. Mark all generated files as generated * Clean up eventprovider test CMakeLists
2019-05-10Properly set the nuget cache for the repo (#24505)Aaron Robinson1-1/+1
* Properly set the nuget cache for the repo * Change coreclr NuGet package cache from "./packages" to "./.packages"
2019-05-08Fix scenarios where SPCL is not crossgen'd and the output is not in the bin ↵Aaron Robinson1-8/+14
directory (#24477)
2019-05-06Port all managed product binaries to use SDK style projects (#24285)Aaron Robinson1-3/+17
Convert managed product binary to use SDK project system. - Uses Arcade for versions strings - Overrides Arcade defined output paths - should change in the future
2019-03-21Avoid stack walk as specified in the exclusion listAndrew Au1-1/+1
2019-03-18Add gcc6 and gcc8 to supported compilersSinan Kaya1-0/+12
2019-03-17Correct current script dir detectionSinan Kaya1-4/+5
2019-03-08Enable build with clang static analyzerJan Vorlicek1-3/+17
As part of LLVM, there is a clang static analyzer tool that provides useful analysis of potential issues in the source code base. This change enables building coreclr with that analyzer enabled.
2019-03-01Use arcade's version of dotnet to build (#22755)Steve MacLean1-1/+1
* Use arcade dotnet * Add cmake_msbuild.cmd Move msbuild.cmd to cmake_msbuild.bat Document intent that this file is only used to resolve Windows cmake dependency on desktop msbuild.exe Remove one instance of msbuild.cmd * Fix inittools.cmd * Remove spurious setup_vs_tools.cmd calls
2019-02-21[Unix|*] Rework and share the logic for determining __DistroRid (#22628)Jarret Shook1-73/+16
* [Unix|*] Rework and share the logic for determining __DistroRid This will consolidate all of our different functions which determine the __DistroRid into one file. In addition, it will remove the unused __HostDistroRid file. Lastly, it corrects the rid choice when crossbuilding musl-arm64 as the cross-rootfs non-portable build will correctly be picked up. * Fix typo and use __BuildArch in place of __Arch * Correct non-portable build decision * Add error for missing redhat-release * Fix redhat comparison * Correct previous rhel or * Fix cross scenerio * Fix missed $ * Set __RuntimeId for runtest.proj * Correct naming convention of file * Address feedback and support -portablebuild=0 With this change: 1. build.sh and build-test.sh should build portable by default. 2. init-distro-rid.sh checks __PortableBuild=1. If so, then it must force rhel 6 and freebsd to __PortableBuild=0 and use the non-portable build - For __PortableBuild=0 init-distro-rid.sh sets the non-portable rid correctly to "${ID}.${VERSION_ID}-${buildArch}" * Correct arguments * Fix if to include then * A few more changes to correct linux-musl-arm64 * Add error for non-cross build and correctly pass ROOTFS_DIR * Correctly exit instead of echo * Correct isCrossBuild and use rootfsDir only * Add documentation * Address feedback * Rework rhel if
2019-02-15Manually update the dependencies.props and move S.P.Corelib to use ↵Tanner Gooding1-2/+2
LangVersion=8.0 (#22452) * Update BuildTools to preview1-03713-01 (master) * Updating CoreCLR to use LangVersion=8.0 * Moving the Windows scripts to default to `dotnet msbuild` for managed components * Setting UseSharedCompilation=true * Changing some additional callsites that were using msbuild to use dotnet msbuild * Revert packages.builds to use Desktop msbuild on Windows * Fixing runtest.cmd to always set DotNetCli
2019-02-12Renaming RuntimeEventSource to NativeRuntimeEventSource (#22533)Sung Yoon Whang1-1/+1
* Renaming RuntimeEventSource to NativeRuntimeEventSource * missed a couple of comments and XPlatEventLogger * rename DotNETRuntimeEventSource.cs to NativeRuntimeEventSource.cs * use condition= instead of ifdef * removing ifdef from NativeRuntimeEventSource.cs * Fix case for 'eventing' directory in csproj * Fix unix builds * This should fix unix build...
2019-02-09Set visibility option to hidden (#21924)Adeel Mujahid1-1/+1
2019-02-07More PAL layer cleanup for GNU and add build script support for GCC (#22369)Sinan Kaya1-8/+44
* Declare throw only when compiling for c++ Prevent the definition from getting defined multiple times and map it to throw() only when compiling c++ code. * Suppress warnings for tests Suppress: -Wno-write-strings -Wno-sign-compare -Wno-narrowing -fpermissive -Wno-int-to-pointer-cast to allow tests to compile * Add gcc option to build.sh script Following clangx.y model add -gccx.y command line arguments with gcc5 and gcc7 being the currnetly supported options. * Allow environment variable to be used for TOOLCHAIN Remove CLANG specific compiler options as well. * Hide non-GNU compiler options * Do not include local directory if cross compiling [ 0%] Building CXX object src/pal/src/eventprovider/tracepointprovider/CMakeFiles/coreclrtraceptprovider.dir/__/lttng/traceptprovdotnetruntime.cpp.o cc1plus: error: include location "/usr/local/include" is unsafe for cross-compilation [-Werror=poison-system-directories] * Suppress unknown pragma warnings src/pal/src/exception/seh-unwind.cpp:37:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] #pragma clang diagnostic pop Removing these cause compilation error on clang7 and arm as follows: In file included from /bin/obj/Linux.arm.Debug/src/pal/src/libunwind/include/libunwind.h:9: /src/pal/src/libunwind/include/libunwind-arm.h:247:9: error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat] typedef struct unw_tdep_save_loc ^ /src/pal/src/libunwind/include/libunwind-arm.h:288:9: error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat] typedef struct * plt not useful for GNU and ARM64/ARM src/pal/src/arch/arm64/callsignalhandlerwrapper.S: Assembler messages: src/pal/src/arch/arm64/callsignalhandlerwrapper.S:31: Error: unexpected characters following instruction at operand 1 -- `bl signal_handler_worker@plt' src/pal/src/arch/arm64/callsignalhandlerwrapper.S:32: Error: unexpected characters following instruction at operand 1 -- `bl signal_handler_worker@plt' * Remove double const from argv in PAL_Initialize Seeing compilation error with GNU for C source files as follows: if (PAL_Initialize(argc, argv) != 0) ^ src/pal/tests/palsuite/common/palsuite.h:21:0, from src/pal/tests/palsuite/c_runtime/asinhf/test1/test1.c:18: src/pal/inc/pal.h:374:1: note: expected ‘const char * const*’ but argument is of type ‘char **’ * Suppress format warnings using GNU for libunwind warning: format ‘%li’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=] Debug (4, " aligned frame, offset %li\n", f->cfa_reg_offset); * Fix -fpermissive warnings for GNU * Suppress unused variable warning in libunwind src/pal/src/libunwind/include/libunwind-aarch64.h:201:5: warning: right-hand operand of comma expression has no effect [-Wunused-value] #define unw_tdep_getcontext(uc) (({ \ ~~~~~~~~~ unw_tdep_context_t *unw_ctx = (uc); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ register uint64_t *unw_base asm ("x0") = (uint64_t*) unw_ctx->uc_mcontext.regs; \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __asm__ __volatile__ ( \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x0, x1, [%[base], #0]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x2, x3, [%[base], #16]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x4, x5, [%[base], #32]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x6, x7, [%[base], #48]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x8, x9, [%[base], #64]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x10, x11, [%[base], #80]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x12, x13, [%[base], #96]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x14, x13, [%[base], #112]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x16, x17, [%[base], #128]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x18, x19, [%[base], #144]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x20, x21, [%[base], #160]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x22, x23, [%[base], #176]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x24, x25, [%[base], #192]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x26, x27, [%[base], #208]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x28, x29, [%[base], #224]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "str x30, [%[base], #240]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "mov x1, sp\n" \ ~~~~~~~~~~~~~~~~ "stp x1, x30, [%[base], #248]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ : [base] "+r" (unw_base) : : "x1", "memory"); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }), 0) * Fix warning: ‘memset’ used with length equal to number of elements warning Fix similar warnings to these by including the element size into total size calculation. src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp: In function ‘int main(int, char**)’: src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp:89:31: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] memset(NewValue,0,BUF_SIZE); * Define CLR specific compiler option CLR_CMAKE_COMPILER By the time toolchain.cmake is called, the compiler detection from cmake is not active. We need an intermediate definition to pass to compiler detection.
2019-02-04Configure MSBuild debug path and save any logsBruce Forstall1-0/+5
We have had many problems in the CI with MSBuild failing, and not capturing the failure logs. See https://github.com/dotnet/coreclr/issues/20236. So, for all msbuild invocations, set MSBUILDDEBUGPATH to a new, distinguished, subdirectory of the bin\Logs directory, named "MsbuildDebugLogs". Change the CI to upload any log files found there.
2019-02-03Convert version.cpp to Ckasper31-3/+3
2019-01-31Add -skipcrossarchnative option to build.cmd (#22091)Bruce Forstall1-3/+11
* Add -skipcrossarchnative option to build.cmd This allows you to skip building the cross-architecture native components. * Add -skipcrossarchnative to build.sh
2019-01-30Remove run.exe and config.json (#21608)Sven Boemer1-18/+61
This moves us one step away from buildtools and towards arcade. This replaces run.sh and run.cmd (and all invocations) with "dotnet.sh msbuild" and "msbuild.cmd". - I'm using these wrapper scripts for now instead of those in eng/common in order to retain the very helpful "Running <command>" output in the build logs. - I'm using msbuild.cmd instead of dotnet.sh to match the current behavior that uses desktop msbuild on windows, instead of dotnet. All of the arguments that used to be implicitly generated by run.exe and config.json are now explicit, resulting in longer (but easier to copy+paste) commands. Some of these arguments are likely unnecessary, but in this change my goal is just to match the run.exe behavior. Later, I would like to go through and clean up parameters that don't need to be passed in every invocation. I might also consider moving more of the common arguments out into variables in a later change. Some of the wrapper scripts now have limited support for parsing "-Argument=Value" style parameters, to support our existing buildpipeline infrastructure, since I thought this was easier to test than changing our buildpipeline definitions. We can remove that parsing logic once we stop using buildpipeline (which has happened at this point). Some subtle parts of the change: * Add msbuild.cmd This simulates the behavior of Tools\msbuild.cmd, which calls desktop msbuild. * Fix BuildOS processing in package build and publish Previously, config.json had its own processing that would set OSName. Instead, we now pass it in explicitly where it's needed (building packages), or not at all (publishing them). * Handle "=" in publish-packages.cmd and other scripts This seems necessary to properly handle the azure access token * Set __BuildOS in PublishPackages Required for cases where the build OS isn't detected during the build such as freebsd. * Use dotnet msbuild in runtest.py This prevents us from having to deal with different quote escape behavior on windows and linux. Previously, arguments like fileloggerparameters and the logger were given quotes to escape semicolons in the argument. On unix, this prevented the argument from being split up by bash. On windows, it seems that the run.cmd/run.exe tools would prevent the extra quotes from being passed to msbuild.exe (desktop msbuild would choke on the quotes if they were passed along). Unlike desktop msbuild, dotnet msbuild is able to parse the quoted strings, so we simply psas the quoted arguments directly to it on windows. We may be able to do the same on unix. * Fix build-test.sh problem with BuildOS When copying native files during the unix test build, we rely on __BuildOS being set. Fixing the import order and always setting __BuildOS fixes this. We should eventually fix the inconsistent use of BuildOS vs __BuildOS.
2019-01-09Support building with python3 on unix (#19356)Omair Majid1-3/+3
The windows build scripts try finding python in order of python3, python2 and then python. The unix build scripts dont. They just try python2 variants and then fail. This change makes brings them closer together by letting users build using only python3.
2018-12-14Publish packages in Azure DevOps official build (#21536)Sven Boemer1-0/+3
This enables coreclr participation in dependency flow.
2018-12-03Remove Hostx86/arm CrossGen from building and Simplify build.sh command line ↵Egor Chesakov1-44/+7
arguments for Linux/arm cross build (Part 2) (#21034) * Stop building and publishing Hostx86/arm crossgen on Linux/arm * Remove -crosscomponent argument and stop using CAC_ROOTFS_DIR environment variable in build.sh * Simplify the related logic in build.sh * Don't need to specify crosscomponent in tests/scripts/run-pmi-diffs.py * Don't set CAC_ROOTFS_DIR in buildpipeline, Jenkins files and in tests/scripts/run-pmi-diffs.py * Adjust documentation
2018-11-12Simplify build.sh command line arguments for Linux/arm cross build (Part 1) ↵Egor Chesakov1-13/+10
(#20836) * Don't use crosscomponent|-crosscomponent command line args in build.sh * Don't use CROSSCOMPONENT environment variable in build.sh src/pal/tools/gen-buildsys-clang.sh * Remove mentioning -crosscomponent from usage() in build-test.sh * Don't use -crosscomponent in buildpipeline * Don't use -crosscomponent in Groovy files * Remove mentioning crosscomponent in Documentation/building/linux-instructions.md * Stop building Hostx86/armel crossgen in build.sh * Disable CrossGen-ing of System.Private.CoreLib on Linux/armel
2018-10-26fixes to build properly on FreeBSD (#20588)Tomas Weinfurt1-1/+3
* fixes to build properly on FreeBSD * remove ulimit from freebsd branch
2018-10-24Run IBCMerge step for Linux on Windows (#20496)Michelle McDaniel1-1/+22
This change does the following: * Move the IBCOptimize step out of the Crossgen section and into the CoreLib build section of build.cmd * Adds -ibconly which will skip building System.Private.CoreLib and only run the ibcmerge step * Adds crossgenonly and partialngen flags to build.sh These three changes facilitate our ability to apply IBC data to Linux assemblies on Windows and the perform the crossgen step on Linux, which will be our flow for official builds when we want to apply IBC data since IBCMerge cannot run on non-Windows platforms
2018-10-16Enable building with Clang 7 (#20417)Jan Vorlicek1-3/+12
The Clang 7 is the first version in which only the major version is used in file names and paths. So the change needed to massage the build files a bit more than what was needed for the previous versions.
2018-10-03Support building cross-architecture components on armel (#20190)Egor Chesakov1-2/+2
2018-09-13Use Hostx64/arm crossgen by default on LinuxEgor Chesakov1-3/+2
2018-09-10Build both Hostx86 and Hostx64 arm32 crossgens. Continue to use Hostx86 ↵Egor Chesakov1-17/+28
crossgen to crossgen System.Private.CoreLib.dll
2018-09-07Fix the slashes when setting the ZapBBInstrDir (#19858)Michelle McDaniel1-1/+1
In OpenMethodProfileDataLogFile, we try to set the directory and path for the .ibc files using windows slashes (\). This causes this code to fail on Linux, which uses forward slashes. This is particularly a problem when setting COMPlus_ZapBBInstrDir, which takes that environment variable and attempts to find the name of the file using wcsrchr(assemblyPath, '\'). This causes a crash on linux when collecting IBC counts. The fix is to ifdef it for linux to use the correct path separator. This change also includes a fix to change the code for checking if IbcTuning is set to use == instead of -eq which was causing a failure in the build that was ignored.
2018-09-06Add logging to file when CrossGen System.Private.CoreLib.dll on Unix (#19848)Egor Chesakov1-6/+9
2018-08-20Add IBC support (#19046)Michelle McDaniel1-1/+1
This change adds support to consume IBC data packages that are created by the dotnet/optimization repository. With these changes and dotnet/buildtools#2103 to enable IBC optimizations for corefx, we will see a 32% decrease in the size of NetCoreApp (and an overall decrease of 16%), a 30% reduction in ref set, a 5% improvement in time to first request and steady state performance for MusicStore. Size Crossgen Partial Partial vs Crossgen (lower is better) Shared (MB) 185.6 137.3 0.74 Microsoft.NETCore.App (MB) 115.6 67.4 0.58 RefSet MusicStore Crossgen Partial Partial vs Crossgen (lower is better) Total 19.389 13.472 0.69 AllReady Crossgen Partial Partial vs Crossgen (lower is better) Total 17.58 12.214 Performance MusicStore Crossgen Partial Partial vs Crossgen (lower is better) Server Start (ms) 870 870.6 1.00 First request (ms) 3532.6 3386.6 0.95 Steady State (ms) 2.926 2.79 0.95 AllReady Crossgen Partial Partial vs Crossgen (lower is better) Server Start (ms) 2102 1942.4 First Request (ms) 4263.2 4126 Steady State (ms) 5.69 5.68 TechEmpower Plaintext Crossgen Partial Partial vs Crossgen (lower is better) Requests per Second 1928649.8 1893183.8 First Request (ms) 76.14 80.11 Startup (ms) 391 372.8 Working Set (MB) 382.2 373.4
2018-08-16Build-test.sh handles native test assets (#19430)Aaron Robinson1-9/+12
* Respect Windows script argument to skip package building. * Bring build.sh logic closer to build.cmd with respect to passing CMAKE flags for building tests * Make cmake gen script find override file without using script arguments * build-test.sh can now build native test projects Remove compileoptions.cmake and push contents into configurecompiler.cmake which contains compiler configuration from repo root CMakeLists.txt
2018-08-13Add a skipmanaged option to build.sh (#19111)Omair Majid1-1/+12
This option is the opposite of -msbuildonunsupportedplatform, and an managed version of of -skipnative. This is useful for bootstrapping on new Linux/x64 distributions, where dotnet may not work (yet) but coreclr will try and use it anyway, failing the bootstrap scripts. See also https://github.com/dotnet/source-build/issues/663 for additional background information.
2018-08-01Use the identified python when building System.Private.CoreLib (#19043)Omair Majid1-0/+2
build.sh and build.cmd contain logic to identify a working version of python to use. System.Private.CoreLib ignores that and directly invokes 'python', which may not work, or even execute a different program.
2018-07-18R2RDump - Test infrastructure (#18745)Amy1-0/+6
* Test infrastructure for R2RDump, compare xml and output diff * Add R2RDumpTest to build-tests * Fix errors causing tests to fail * Create XUnitWrapper for R2RDumpTest * Generate readytorun binaries from source code, copy expected xml output files to executable's directory * Test R2RDump through commandline instead of calling R2RDump functions * Fix errors * Prevent duplicate xml tags * Read test xml from string instead of file * Fix test bugs * Call dotnet r2rdump from msbuild * Fix errors * Use right slash for paths in bash * Use different expected xml for different architectures * R2RDumpTests for non-Windows * Add more test cases * Fix errors * Supress warnings, avoid error when parsing x86 images * Add license headers