pre_pgi.cmd 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. :: * init_pgi.cmd
  7. :: - build (with PGI instrumentation enabled)
  8. :: - init_pgo.cmd
  9. :: - build (using PGO profile)
  10. @echo off
  11. set arch_pgi=%1
  12. set flavor_pgi=%2
  13. set binpath_pgi=%3
  14. set builderror=
  15. if "%arch_pgi%"=="" (
  16. goto:usage
  17. )
  18. if "%flavor_pgi%"=="" (
  19. goto:usage
  20. )
  21. if "%binpath_pgi%"=="" (
  22. goto:usage
  23. )
  24. if not exist %binpath_pgi% (
  25. md %binpath_pgi%
  26. ) else (
  27. if exist %binpath_pgi%\*.pgc ( del %binpath_pgi%\*.pgc )
  28. )
  29. REM Build with pgo instrumentation
  30. set POGO_TYPE=PGI
  31. REM Temporary fix around pgo bug, todo:: check if still necessary once toolset is updated
  32. set _LINK_=/cgthreads:1
  33. goto:eof
  34. :usage
  35. echo Invalid/missing arguments
  36. echo.
  37. echo Usage: pre_pgi.cmd ^<arch^> ^<flavor^> ^<binary_path^>
  38. echo - arch : Architecture you want to build pogo
  39. echo - flavor: flavor you want to build pogo
  40. echo - binary_path: output path of your binaries
  41. exit /b 1