Fixed an issue which will cause wrong library instances used for constructor re-ordering.
[people/mcb30/basetools.git] / toolsetup.bat
index 325159a..1429983 100755 (executable)
@@ -40,6 +40,9 @@ popd
 if not defined EDK_TOOLS_PATH set EDK_TOOLS_PATH=%BASE_TOOLS_PATH%\r
 mkdir %EDK_TOOLS_PATH%\Bin\Win32\r
 \r
+if not defined ORIGINAL_PATH set ORIGINAL_PATH=%PATH%\r
+set PATH=%EDK_TOOLS_PATH%\Bin\Win32;%EDK_TOOLS_PATH%\Bin;%ORIGINAL_PATH%\r
+\r
 :path_ok\r
 \r
 if /I "%1"=="-h" goto Usage\r
@@ -52,9 +55,6 @@ if /I "%1"=="build" goto build
 if /I "%1"=="rebuild" goto rebuild\r
 if NOT "%1"=="" goto Usage\r
 \r
-if not defined ORIGINAL_PATH set ORIGINAL_PATH=%PATH%\r
-set PATH=%EDK_TOOLS_PATH%\Bin\Win32;%EDK_TOOLS_PATH%\Bin;%ORIGINAL_PATH%\r
-\r
 IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\BootSectImage.exe" goto build\r
 IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\build.exe" goto build\r
 IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\EfiLdrImage.exe" goto build\r