Project

General

Profile

Actions

Refactoring #380

closed

Feature #353: Release v1.3

tests/lifecycle.c: Split up into compilation units

Added by Edward . almost 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Category:
Build system
Target version:
Start date:
05/13/2022
Due date:
% Done:

100%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:

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.


Related issues 1 (1 open0 closed)

Related to flashrom - Refactoring #428: Replace pre-processor ifdefs with weak functionsNew10/15/2022

Actions
Actions #1

Updated by Anastasia Klimchuk almost 2 years ago

  • Assignee set to Anastasia Klimchuk
Actions #2

Updated by Anastasia Klimchuk almost 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
Actions #3

Updated by Edward . almost 2 years ago

  • Related links updated (diff)
Actions #4

Updated by Anastasia Klimchuk over 1 year 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

Actions #5

Updated by Felix Singer over 1 year ago

  • Tracker changed from Feature to Refactoring
  • Target version changed from 1.3 to main
Actions #6

Updated by Anastasia Klimchuk over 1 year 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.

Actions #7

Updated by Anastasia Klimchuk over 1 year ago

  • Status changed from In Progress to Resolved
  • % Done changed from 60 to 100
Actions #8

Updated by Felix Singer over 1 year ago

  • Related to Refactoring #428: Replace pre-processor ifdefs with weak functions added
Actions

Also available in: Atom PDF