Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
cea097df
Unverified
Commit
cea097df
authored
4 years ago
by
Victor Oliveira
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Patch auto-deps for Windows CXX (#18721)
parent
0a86291e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildroot/share/PlatformIO/scripts/common-features-dependencies.py
+27
-2
27 additions, 2 deletions
.../share/PlatformIO/scripts/common-features-dependencies.py
with
27 additions
and
2 deletions
buildroot/share/PlatformIO/scripts/common-features-dependencies.py
+
27
−
2
View file @
cea097df
...
...
@@ -93,6 +93,29 @@ def install_features_dependencies():
proj
.
set
(
"
env:
"
+
env
[
"
PIOENV
"
],
"
src_filter
"
,
src_filter
)
env
.
Replace
(
SRC_FILTER
=
src_filter
)
# search the current compiler, considering the OS
def
search_compiler
():
if
env
[
'
PLATFORM
'
]
==
'
win32
'
:
# the first path have the compiler
compiler_path
=
None
for
path
in
env
[
'
ENV
'
][
'
PATH
'
].
split
(
'
;
'
):
if
re
.
search
(
r
'
platformio\\packages.*\\bin
'
,
path
):
compiler_path
=
path
break
if
compiler_path
==
None
:
print
(
"
Could not find the g++ path
"
)
return
None
print
(
compiler_path
)
for
file
in
os
.
listdir
(
compiler_path
):
if
file
.
endswith
(
"
g++.exe
"
):
return
file
print
(
"
Could not find the g++
"
)
return
None
else
:
return
env
.
get
(
'
CXX
'
)
# load marlin features
def
load_marlin_features
():
if
"
MARLIN_FEATURES
"
in
env
:
...
...
@@ -102,7 +125,10 @@ def load_marlin_features():
# print(env.Dump())
build_flags
=
env
.
get
(
'
BUILD_FLAGS
'
)
build_flags
=
env
.
ParseFlagsExtended
(
build_flags
)
cmd
=
[]
cxx
=
search_compiler
()
cmd
=
[
cxx
]
# build flags from board.json
# if 'BOARD' in env:
# cmd += [env.BoardConfig().get("build.extra_flags")]
...
...
@@ -113,7 +139,6 @@ def load_marlin_features():
cmd
+=
[
'
-D
'
+
s
]
# cmd += ['-w -dM -E -x c++ Marlin/src/inc/MarlinConfigPre.h']
cmd
+=
[
'
-w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-features-dependencies.h
'
]
cmd
=
[
env
.
get
(
'
CXX
'
)]
+
cmd
cmd
=
'
'
.
join
(
cmd
)
print
(
cmd
)
define_list
=
subprocess
.
check_output
(
cmd
,
shell
=
True
).
splitlines
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment