mirror of https://github.com/acidanthera/audk.git
BaseTools/GenFds: remove the old logic since ActivePlatform is abs. path
We can support the DSC file out of workspace. this old logic first make the absolute path to relative path and strips the leading slash off, then append it to workspace. it cause GenFds failure on Linux when the DSC file is out of workspace. Since we make sure the ActivePlatform is abs. path, so we don't need this old logic to change the abs. path to relative. Cc: Liming Gao <liming.gao@intel.com> Cc: Marvin Haeuser <marvin.haeuser@outlook.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
d429fcd0d2
commit
e642ceb8a5
|
@ -138,18 +138,10 @@ def main():
|
||||||
|
|
||||||
if not os.path.exists(ActivePlatform) :
|
if not os.path.exists(ActivePlatform) :
|
||||||
EdkLogger.error("GenFds", FILE_NOT_FOUND, "ActivePlatform doesn't exist!")
|
EdkLogger.error("GenFds", FILE_NOT_FOUND, "ActivePlatform doesn't exist!")
|
||||||
|
|
||||||
if os.path.normcase (ActivePlatform).find(Workspace) == 0:
|
|
||||||
ActivePlatform = mws.relpath(ActivePlatform, Workspace)
|
|
||||||
if len(ActivePlatform) > 0 :
|
|
||||||
if ActivePlatform[0] == '\\' or ActivePlatform[0] == '/':
|
|
||||||
ActivePlatform = ActivePlatform[1:]
|
|
||||||
else:
|
|
||||||
EdkLogger.error("GenFds", FILE_NOT_FOUND, "ActivePlatform doesn't exist!")
|
|
||||||
else:
|
else:
|
||||||
EdkLogger.error("GenFds", OPTION_MISSING, "Missing active platform")
|
EdkLogger.error("GenFds", OPTION_MISSING, "Missing active platform")
|
||||||
|
|
||||||
GenFdsGlobalVariable.ActivePlatform = PathClass(NormPath(ActivePlatform), Workspace)
|
GenFdsGlobalVariable.ActivePlatform = PathClass(NormPath(ActivePlatform))
|
||||||
|
|
||||||
if (Options.ConfDirectory):
|
if (Options.ConfDirectory):
|
||||||
# Get alternate Conf location, if it is absolute, then just use the absolute directory name
|
# Get alternate Conf location, if it is absolute, then just use the absolute directory name
|
||||||
|
|
Loading…
Reference in New Issue