mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 05:06:30 +04:00
fbt/ufbt: Ensure POSIX paths are passed to GDB on all platforms (#3360)
* fbt/ufbt: Ensure POSIX paths are passed to GDB on all platforms GDB heavily dislikes forward slashes from Windows paths and strips them internally instead of normalizing them. Account for this by passing POSIX paths explicitly. * fbt: different approach for posix path handling * fbt, ufbt: further fixes for path handling * fbt: explicit path stringification * linter fixes Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import shutil
|
||||
|
||||
from fbt.sdk.cache import SdkCache
|
||||
from fbt.sdk.collector import SdkCollector
|
||||
from fbt.util import path_as_posix
|
||||
from fbt.util import PosixPathWrapper
|
||||
from SCons.Action import Action
|
||||
from SCons.Builder import Builder
|
||||
from SCons.Errors import UserError
|
||||
@@ -80,7 +80,7 @@ class SdkMeta:
|
||||
vars,
|
||||
target=Entry(self.MAP_FILE_SUBST),
|
||||
)
|
||||
return path_as_posix(expanded_vars)
|
||||
return PosixPathWrapper.fixup_separators(expanded_vars)
|
||||
|
||||
|
||||
class SdkTreeBuilder:
|
||||
@@ -149,7 +149,7 @@ class SdkTreeBuilder:
|
||||
meta.save_to(self.target[0].path)
|
||||
|
||||
def build_sdk_file_path(self, orig_path: str) -> str:
|
||||
return path_as_posix(
|
||||
return PosixPathWrapper.fix_path(
|
||||
posixpath.normpath(
|
||||
posixpath.join(
|
||||
self.SDK_DIR_SUBST,
|
||||
|
||||
Reference in New Issue
Block a user