Skip to content

build: use CFL-specific filename macro#81

Merged
edsiper merged 1 commit into
masterfrom
build-cfl-filename
Jul 11, 2026
Merged

build: use CFL-specific filename macro#81
edsiper merged 1 commit into
masterfrom
build-cfl-filename

Conversation

@edsiper

@edsiper edsiper commented Jul 11, 2026

Copy link
Copy Markdown
Member

Summary

Follow up on #54 by removing the redundant global __FILENAME__=__FILE__ compiler definition and using a CFL-specific filename macro in the logging interface.

CFL_FILENAME defaults to __FILE__, so compiler path-remapping options such as -ffile-prefix-map work normally. Embedders can override the value without relying on the reserved __FILENAME__ identifier or modifying global CMAKE_C_FLAGS.

Impact

  • Removes the remaining global filename compiler definition from CFL's build.
  • Replaces the generic reserved identifier with CFL_FILENAME.
  • Preserves the existing cfl_report_runtime_error() behavior.
  • Keeps the change scoped to CFL; bundled and downstream repositories are unchanged.

Validation

  • CFL test suite: 34/34 passed.
  • Public-header self-containment tests passed.
  • Release build with -ffile-prefix-map passed.
  • The resulting CFL archive contains no checkout path, $(subst ...), or $(abspath ...) expression.
  • git diff --check passed.

Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
@edsiper edsiper marked this pull request as ready for review July 11, 2026 16:07
@edsiper edsiper merged commit 3eeba5d into master Jul 11, 2026
22 checks passed
@edsiper edsiper deleted the build-cfl-filename branch July 11, 2026 16:13
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.

1 participant