Comments (2)
Hello
When I designed FASTBuild, I wanted to make sure that you could build multiple configurations in parallel. It's really nice to be able to build all configs (Debug & Release for example) in parallel before submitting changes (with "fbuild all" for example). A make-like command line support for defines is counter to this goal.
I think you really want to declare your permanent configs in the bff, but I can see how if you have many transient options creating a full matrix is pretty painful.
With that in mind, I see two options:
1) In the bff
- declare the permanent configs (like release and debug)
- group your temporary settings (those that aren't automatically derived from the above) together and declare them with #define and enable disable them as required:
//#define USE_SIMD_INSTRUCTIONS
#define WITH_GLES_CG_SUPPORT
Pro: Switching between Debug and Release does't cause unnecessary rebuilding
Pro: No changes required to FASTBuild
Con: Local edits to bff may be undesireable
2) Add command line -define support
Your patch as it stands isn't safe, because it doesn't cause the bff config to be re-evaluated when you change the defines. This means config based on those defines isn't updated and things are not rebuilt when needed. So switching between build configs won't correctly rebuild for example.
This can be fixed by extending your change to record the name and values of the defines and re-parsing if those change between builds. FASTBuild already does this for #import directive, so that code could be extended to track these defines in the same way.
Pro: Less complicated bff / aligns with your expectations
Con: Rebuilds whenever you change anything
Con: Can't parallelize multiple configs
Con: Change to FASTBuild required
Let me know what you think about these options.
PS - If you'd like to pursue option 2, could you please create a pull request rather than attaching a diff? It would make integration much easier.
from fastbuild.
Thank you for the reply
- I see your point but indeed maintaining that matrix for me turned out way more complicated than I was wanted, especially given that the sluggish ndk-build script it replaced was quite simple.
- I realized this problem with my patch after trying to use it for a bit :)
I'll figure out the needed fix and create a pull request.
Thank you for the guidance.
If you mentioned #import than I can mention an issue I had with it, I'll create another github issue.
from fastbuild.
Related Issues (20)
- FASTBUILD_CACHE_PATH_MOUNT_POINT HOT 3
- Failed to store fileId xxx for manifest 0xdeadbeef HOT 6
- MSVC 2022 Build Tools Standalone: lib.exe having trouble with FASTBuild HOT 3
- Support alias for unity node
- Stop on error when building multiple targets. HOT 2
- Specify how many source files in one unity file HOT 1
- Problem resolving build-time substitutions when followed by non whitespace character HOT 1
- Crash in runnable thread FastBuildJobProcessor HOT 3
- CPU underutilization on Windows10 HOT 3
- Discussion about environment variable precedence HOT 1
- Error in clang-cl cache HOT 4
- FASTBuild Error #1100 HOT 3
- FastBuild performance regression in 1.11 and 1.12 HOT 8
- Run executable in PATH from Exec() HOT 2
- When Unreal SourceCode(OculusVR Version) Built, android NDK part weren't fast built HOT 4
- Error in cache when system locale is differed HOT 2
- compile_commands.json has invalid `arguments` when passing defines containing quoted strings HOT 4
- Create a target that always runs HOT 1
- FASTBuild Mac build failed
- Xcode Project: "Run" Button Only Builds, Doesn't Execute HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastbuild.