-
-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow post scripts in library.json #4305
Comments
Thanks for the report! Could you re-test with Example in docs https://docs.platformio.org/en/latest/manifests/library-json/fields/build/extrascript.html |
Looks like projenv access feature is working as expected :) |
After digging some more in projects it doesn't look as good. Don't really know what's wrong, but using ProcessUnFlags (-f-nortti) gives unexpected linker errors in some projects. Using board_build.unflags in platformio.ini does not bring these issues. More detais at https://community.platformio.org/t/force-rtti-from-library/28176 |
Just FYI - all problems have been resolved. Thanks! |
This doesn't work. It ignores me and builds e.g. libFS.a with no RTTI. I have no idea what is going on. I have no control over this and typeinfo vanishes for things I need it for randomly. |
@mathemaphysics see https://community.platformio.org/t/issue-with-defines-that-target-platform-module/41345/3 |
What kind of issue is this?
Start by telling us what problem you’re trying to solve. Often a solution
already exists! Don’t send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small.
Configuration
Operating system: Win10 x64
PlatformIO Version (
platformio --version
): 6.0.2Description of problem
When writing a library, it sometimes is necessary to affect build settings of the
projenv
environment which is used to build thesrc/
folder. Such as in this example, where the inclusion of the library should cause all-fno-rtti
flags to vanish.This is only partially possible in the
extraScript
of a library. Using e.g. as scriptleads to all
-fno-rtti
flags being removed in the library and framework compilation, but not for the files insrc/
. This is because the Arduino-ESP8266 adds them back in after it was executed, which the library build script cannot affect.does not work either.
Of course,
build_unflags = -fno-rtti
can be set in theplatformio.ini
to counter this, but then the user has to do an extra step when including the library.Another use case is e.g. this library where users are being told to add
extra_script
to theirplatformio.ini
that points into the library, because thelibrary.json
has no mechanism for post and pre scripts.It would be nice to specify
pre:
andpost:
in theextraScripts
field / array of thelibrary.json
to allow this better without user interaction.Steps to Reproduce
lib/MyLib/with_rtti.py
Actual Results
Compilation failure,
-fno-rtti
not fully removed.Expected Results
Possibility to affect
src/
compilation inextraScript
, e.g. removing build flags added by later framework builder scripts.If problems with PlatformIO Build System:
See linked project.
Additional info
-/-
The text was updated successfully, but these errors were encountered: