summaryrefslogtreecommitdiff
path: root/build.cmd
diff options
context:
space:
mode:
authorVictor "Nate" Graf <nategraf1@gmail.com>2017-12-20 18:07:52 -0800
committerGitHub <noreply@github.com>2017-12-20 18:07:52 -0800
commit7524d72d4f0f634fe5407280b83c25181dc8c556 (patch)
tree119c7edbbd7b3a0aec47d55334d52d1471e3a3da /build.cmd
parent9891c8ba8f84ff646455b4493447295c591665f4 (diff)
downloadcoreclr-7524d72d4f0f634fe5407280b83c25181dc8c556.tar.gz
coreclr-7524d72d4f0f634fe5407280b83c25181dc8c556.tar.bz2
coreclr-7524d72d4f0f634fe5407280b83c25181dc8c556.zip
Enable EventPipe across Unix and Windows (#14772)
* [squashed] most work complete to enable EventPipe on Windows * Eventpipe now builds on Windows * Ensure evevntpipe is intialized on Windows * Resolve the location of python from build.cmd * Ensure eventing files are generated when needed * moving linkage declaration to cmake * create new event from constructor * enable FEATURE_EVENT_TRACE and FEATURE_PERF_TRACE everywhere * [WIP] checkpoint in fixing contarct errors * add another possible python location * Fix double delete bug in EventPipeConfiguration destructor * Fix typo in function name * Revert changes to .gitgnore * bump to netstandard1.6 in preperation for new version of TraceEvent * Revert changes to groovy files * revert changes to perf-prep scripts * add common.h and use nothrow * Fix issue which was causing double delete of configprovider * Add new test utilizing TraceEvent * Remove accidentally added local directory reference * Add comment to explain the addition of misc/tracepointprovider.cpp * Add back sys.exit(0) and refactor * Change conditional to be more direct * Better handle NULL config * Initialize m_deleteDefered * Eliminate obsolete field * Fix spelling error * Fix nits * Make smaple progiler timing functions easier to read * Move projects back to netstandard1.4 * Incomplete improvements to EventPipeTrace test * Add event integrity checks to test * Clean up some left over code * Add EventSource based test * Remove unused PAL tests on Windows * Fix Linux build breaks * Minor changes to CMake files * Remove //HACK for hack that was previously removed * Fix formatting and negate a #ifdef * Add conditional to ensure PERFTRACING is not enabled without EVENT_TRACE * Take lock on EventPipeProvider and EventPipeConfiguration destruction * Load winmm.dll at runtime * Change function name and compile conditions * Move typedef into #ifndef * Use the correct config in setup * Change lifecycle managment of EventPipeConfiguration's configuration provider * Enable EventPipe tests pri0 and disable broken tests * Replace python3 only error with python2 compatable one * Make common.csproj build pri0 * Change TraceEvent version to 2.0.2 to match published verison * Address cross build failure * Remove use of undefined variable * Add crossgen fix to .cmd * Use more specific types to avoid marshalling errors * Use Assert-style statements and remove one check * Fix cross arch build * Fix flipped branch * Bring build.cmd changes to build.sh * Fix cmake writing * Revert "Bring build.cmd changes to build.sh" This reverts commit 893c6492548d8bc9859ebba5b1b810aa630fac63. * remove stdlib.h * Fix out of order null check
Diffstat (limited to 'build.cmd')
-rw-r--r--build.cmd52
1 files changed, 43 insertions, 9 deletions
diff --git a/build.cmd b/build.cmd
index fd17ffdf0e..9380f25866 100644
--- a/build.cmd
+++ b/build.cmd
@@ -28,7 +28,7 @@ set __ThisScriptDir="%~dp0"
if defined VisualStudioVersion (
if not defined __VSVersion echo %__MsgPrefix%Detected Visual Studio %VisualStudioVersion% developer command ^prompt environment
goto :Run
-)
+)
echo %__MsgPrefix%Searching ^for Visual Studio 2017 or 2015 installation
set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
@@ -294,6 +294,16 @@ if %__EnforcePgo%==1 (
)
)
+REM Determine if this is a cross-arch build
+
+if /i "%__BuildArch%"=="arm64" (
+ set __DoCrossArchBuild=1
+ )
+
+if /i "%__BuildArch%"=="arm" (
+ set __DoCrossArchBuild=1
+ )
+
:: Set the remaining variables based upon the determined build configuration
set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%"
set "__IntermediatesDir=%__RootBinDir%\obj\%__BuildOS%.%__BuildArch%.%__BuildType%"
@@ -382,6 +392,38 @@ for /f "tokens=*" %%s in ('%DotNetCli% msbuild "%OptDataProjectFilePath%" /t:Dum
REM =========================================================================================
REM ===
+REM === Generate source files for eventing
+REM ===
+REM =========================================================================================
+
+REM Find python and set it to the variable PYTHON
+echo import sys; print sys.executable | (python2.7 || python2 || py -2 || python) > %TEMP%\pythonlocation.txt 2> NUL
+set /p PYTHON=<%TEMP%\pythonlocation.txt
+if NOT DEFINED PYTHON (
+ echo %__MsgPrefix%Error: Could not find a python 2.7 installation
+ exit /b 1
+)
+
+if /i "%__DoCrossArchBuild%"=="1" (
+ set __IntermediatesIncDir=%__CrossCompIntermediatesDir%\src\inc
+ set __IntermediatesEventingDir=%__CrossCompIntermediatesDir%\eventing
+) else (
+ set __IntermediatesIncDir=%__IntermediatesDir%\src\inc
+ set __IntermediatesEventingDir=%__IntermediatesDir%\eventing
+)
+
+echo Laying out dynamically generated files consumed by the build system
+echo Laying out dynamically generated Event test files and etmdummy stub functions
+%PYTHON% -B -Wall %__SourceDir%\scripts\genEventing.py --inc %__IntermediatesIncDir% --dummy %__IntermediatesIncDir%\etmdummy.h --man %__SourceDir%\vm\ClrEtwAll.man --nonextern || exit /b 1
+
+echo Laying out dynamically generated EventPipe Implementation
+%PYTHON% -B -Wall %__SourceDir%\scripts\genEventPipe.py --man %__SourceDir%\vm\ClrEtwAll.man --intermediate %__IntermediatesEventingDir%\eventpipe --nonextern || exit /b 1
+
+echo Laying out ETW event logging interface
+%PYTHON% -B -Wall %__SourceDir%\scripts\genEtwProvider.py --man %__SourceDir%\vm\ClrEtwAll.man --intermediate %__IntermediatesIncDir% --exc %__SourceDir%\vm\ClrEtwAllMeta.lst || exit /b 1
+
+REM =========================================================================================
+REM ===
REM === Build the CLR VM
REM ===
REM =========================================================================================
@@ -476,14 +518,6 @@ REM === Build Cross-Architecture Native Components (if applicable)
REM ===
REM =========================================================================================
-if /i "%__BuildArch%"=="arm64" (
- set __DoCrossArchBuild=1
- )
-
-if /i "%__BuildArch%"=="arm" (
- set __DoCrossArchBuild=1
- )
-
if /i "%__DoCrossArchBuild%"=="1" (
REM Scope environment changes start {
setlocal