Skip to content
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

Fixed build issues on window #1449

Merged
merged 6 commits into from
Aug 3, 2022
Merged

Fixed build issues on window #1449

merged 6 commits into from
Aug 3, 2022

Conversation

oontvoo
Copy link
Member

@oontvoo oontvoo commented Jul 27, 2022

  • Added missing dlimport/export attributes in function definitions. (They are needed in both decls and defs)
  • Removed dlimport/dlexprt attribute in private field. (global_context is not exported anywhere).

- Added missing dlimport/export attributes in function definitions. (They are needed in both decls and defs)
- Removed dlimport/dlexprt attribute in private field. (global_context is not exported anywhere).
@oontvoo
Copy link
Member Author

oontvoo commented Jul 27, 2022

@dominichamon : more fixes :)

@dmah42
Copy link
Member

dmah42 commented Jul 28, 2022

":(.text+0x2e7e): undefined reference to 'benchmark::internal::global_context[abi:cxx11]'" suggests we do need something on global_context

@oontvoo
Copy link
Member Author

oontvoo commented Jul 28, 2022

global_context

Oh, turns out - there are a few places in the code where this variable was forward-declared then used :(
I'll move the decl to the header then - IMO, it's not very clean to use forward decl like this.

@sergiud
Copy link
Contributor

sergiud commented Aug 1, 2022

In general, benchmark exports too many internal symbols already. Consider compiling the internal parts as object files that are reused for tests only. This avoids exposing internal symbols in the library which reduces its size. See, for example, how this is solved in Ceres solver.

@dmah42
Copy link
Member

dmah42 commented Aug 3, 2022

In general, benchmark exports too many internal symbols already. Consider compiling the internal parts as object files that are reused for tests only. This avoids exposing internal symbols in the library which reduces its size. See, for example, how this is solved in Ceres solver.

that's really clean.

i'm going to merge this to resolve the current issues but a longer term plan to move things to internal library sounds great.

@dmah42 dmah42 merged commit 1cca1d0 into google:main Aug 3, 2022
@oontvoo oontvoo deleted the fix_window_dcl branch August 3, 2022 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants