BaseTools: Fix a bug Build directory should relative to WORKSPACE
The bug is for build output files it still use mws.join function, it cause maybe we will get the build output files in the PACKAGES_PATH because mws.join will try WORKSPACE first, if the file doesn't exist then try PACKAGES_PATH. But for build output, we expected it should relative to WORKSPACE. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -311,7 +311,7 @@ def NormPath(Path, Defines={}):
|
||||
# To local path format
|
||||
#
|
||||
Path = os.path.normpath(Path)
|
||||
if Path.startswith(GlobalData.gWorkspace) and not os.path.exists(Path):
|
||||
if Path.startswith(GlobalData.gWorkspace) and not Path.startswith(GlobalData.gBuildDirectory) and not os.path.exists(Path):
|
||||
Path = Path[len (GlobalData.gWorkspace):]
|
||||
if Path[0] == os.path.sep:
|
||||
Path = Path[1:]
|
||||
|
Reference in New Issue
Block a user