Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Issue with Clang 18.1.6 and higher versions #82

@HeavyTony2

Description

@HeavyTony2
[Clang Frontend Potentially Breaking Changes](https://releases.llvm.org/18.1.6/tools/clang/docs/ReleaseNotes.html#id208)
Target OS macros extension A new Clang extension (see [here](https://releases.llvm.org/18.1.6/tools/clang/docs/ReleaseNotes.html#target-os-detail)) is enabled for Darwin (Apple platform) targets. Clang now defines TARGET_OS_* macros for these targets, which could break existing code bases with improper checks for the TARGET_OS_ macros. For example, existing checks might fail to include the TargetConditionals.h header from Apple SDKs and therefore leaving the macros undefined and guarded code unexercised.

Affected code should be checked to see if it’s still intended for the specific target and fixed accordingly.

The extension can be turned off by the option -fno-define-target-os-macros as a workaround.

https://releases.llvm.org/18.1.6/tools/clang/docs/ReleaseNotes.html#clang-frontend-potentially-breaking-changes

Trying to build a conda package with 18.1.6 or higher will result in this

In file included from ./src/duktape/duktape.h:205:
./src/duktape/duk_config.h:459:7: error: 'TARGET_OS_BRIDGE' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]
conda-forge/dukpy-feedstock#20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions