Refactoring #380
closedFeature #353: Release v1.3
tests/lifecycle.c: Split up into compilation units
100%
Description
As remarked in https://review.coreboot.org/c/flashrom/+/64224
We could get rid of the pre-processor conditionals by splitting up the file into per-driver compilation units and using a weak symbol entry point then letting the linker do the rest for us.
Related links
Feel free to rebase https://review.coreboot.org/c/flashrom/+/62777 and drive it forwards.
Updated by Anastasia Klimchuk over 2 years ago
- Assignee set to Anastasia Klimchuk
Updated by Anastasia Klimchuk over 2 years ago
- Tracker changed from Cleanup to Feature
- Category set to Build system
- Status changed from New to In Progress
- Target version changed from none to 1.3
- Parent task set to #353
Updated by Anastasia Klimchuk over 2 years ago
- % Done changed from 0 to 60
Current status: lifecycle.c is split into per-programmer files. So one large lifecycle.c does not exist anymore, there is an individual file for each programmer.
What is left: "get rid of the pre-processor conditionals" but this will be done after meson upgrade is merged https://review.coreboot.org/c/flashrom/+/63724
Updated by Felix Singer about 2 years ago
- Tracker changed from Feature to Refactoring
- Target version changed from 1.3 to main
Updated by Anastasia Klimchuk about 2 years ago
We just had an in-depth discussion on the topic of #ifdef vs weak symbols in unit tests and decided to keep #ifdef for now.
Reasons (from meeting notes):
1) Weak symbols makes code less obvious: harder to understand what is going on
2) Flashrom (non-test code) does not use weak symbols, maybe tests should not either? We should use the same concept in flashrom and test code. We can switch both to weak symbols, or none.
3) Let’s think about it later?
4) Not blocking release.
5) Ideally we won’t be touching ifdefs until we drop make
Closing this ticket, but we may return back to the question of weak symbols after the release.
Updated by Anastasia Klimchuk about 2 years ago
- Status changed from In Progress to Resolved
- % Done changed from 60 to 100
Updated by Felix Singer about 2 years ago
- Related to Refactoring #428: Replace pre-processor ifdefs with weak functions added