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

🐛 Force .a file creation #25

Merged
merged 1 commit into from
Nov 21, 2024
Merged

🐛 Force .a file creation #25

merged 1 commit into from
Nov 21, 2024

Conversation

SizzinSeal
Copy link
Member

@SizzinSeal SizzinSeal commented Nov 21, 2024

Overview

Force the creation of a units.a file

Motivation

The template can't be compiled reliably on all platforms if no .a file is produced

Implementation

A dummy source file is created, and in that source file is an anonymous namespace with a volatile global variable. This forces the creation of a .a file yet won't cause any potential linker errors.

// src/dummy.cpp

namespace {
volatile char dummy_var;
}

@sufferiing sufferiing merged commit 38cb4d7 into main Nov 21, 2024
3 checks passed
@SizzinSeal SizzinSeal deleted the bugfix/a-file-creation branch November 22, 2024 03:54
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.

2 participants