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

Package.swift does not define NDEBUG or NS_BLOCK_ASSERTIONS for release build #1705

Open
xanadu opened this issue Nov 20, 2024 · 1 comment
Labels
backlog We hope to fix this feature/bug in the future

Comments

@xanadu
Copy link

xanadu commented Nov 20, 2024

Describe the bug

Package.swift does not define NDEBUG or NS_BLOCK_ASSERTIONS for release build

Steps to reproduce

  1. build a release build for Bugsnag
  2. The generated .o file is linking to OBJC_CLASS$_NSAssertionHandler

nm Bugsnag.o | grep -i "assert" 1 ↵
U OBJC_CLASS$_NSAssertionHandler

Suggestion

Add c building flag to compile NS_ASSERT and assert out.

        cSettings: [
            .define("NS_BLOCK_ASSERTIONS", .when(configuration: .release)),
            .define("NDEBUG", .when(configuration: .release)),
        ],
@xanadu xanadu changed the title Package.swift does not define NDEBUG for release build Package.swift does not define NDEBUG or NS_BLOCK_ASSERTIONS for release build Nov 20, 2024
@hannah-smartbear
Copy link

Hi @xanadu,

Thanks for raising this with us. We have added an item to our backlog to make this change, and we will be sure to update you here once this is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to fix this feature/bug in the future
Projects
None yet
Development

No branches or pull requests

2 participants