Skip to content

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.

3 participants