pre_pgi.cmd 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ::-------------------------------------------------------------------------------------------------------
  2. :: Copyright (C) Microsoft. All rights reserved.
  3. :: Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. ::-------------------------------------------------------------------------------------------------------
  5. :: PGO Build Workflow:
  6. :: * pre_pgi.cmd
  7. :: - build (with PGI instrumentation enabled)
  8. :: - post_pgi.cmd
  9. :: - pogo_training.ps1
  10. :: - pre_pgo.cmd
  11. :: - build (using PGO profile)
  12. :: - post_pgo.cmd
  13. @echo off
  14. if "%PogoConfig%"=="False" (
  15. echo ---- Not a Pogo Config. Skipping step.
  16. exit /b 0
  17. )
  18. set arch_pgi=%1
  19. set flavor_pgi=%2
  20. set binpath_pgi=%3
  21. set builderror=
  22. if "%arch_pgi%"=="" (
  23. goto:usage
  24. )
  25. if "%flavor_pgi%"=="" (
  26. goto:usage
  27. )
  28. if "%binpath_pgi%"=="" (
  29. goto:usage
  30. )
  31. if not exist %binpath_pgi% (
  32. md %binpath_pgi%
  33. ) else (
  34. if exist %binpath_pgi%\*.pgc ( del %binpath_pgi%\*.pgc )
  35. )
  36. REM Build with pgo instrumentation
  37. set POGO_TYPE=PGI
  38. REM Temporary fix around pgo bug, todo:: check if still necessary once toolset is updated
  39. set _LINK_=/cgthreads:1
  40. goto:checkpass
  41. :usage
  42. echo Invalid/missing arguments
  43. echo.
  44. echo Usage: pre_pgi.cmd ^<arch^> ^<flavor^> ^<binary_path^>
  45. echo - arch : Architecture you want to build pogo
  46. echo - flavor: flavor you want to build pogo
  47. echo - binary_path: output path of your binaries
  48. exit /b 1
  49. :checkpass
  50. exit /b 0