Skip to content

Commit

Permalink
Merge pull request #117 from xhochy/disable-wundef-prefix
Browse files Browse the repository at this point in the history
Disable -Werror,-Wundef-prefix=TARGET_OS as they are not yet defined in the 10.9 SDK used for osx-64
  • Loading branch information
isuruf authored Nov 18, 2020
2 parents 5580c58 + 4055321 commit 234a25c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set version = "11.0.0" %}
{% set major_version = version.split(".")[0] %}
{% set build_number = 1 %}
{% set build_number = 2 %}

package:
name: clang_packages
Expand All @@ -16,6 +16,9 @@ source:
- patches/0003-clang-Fix-normalizeProgramName-s-handling-of-dots-ou.patch
- patches/0001-Set-VERSION-in-osx-as-well.patch
- patches/cross-compile.diff
# Disable -Werror,-Wundef-prefix=TARGET_OS as they are not yet defined in the 10.9 SDK used for osx-64
# Only enable it for TARGET_OS_OSX.
- patches/disable-wundef-prefix.patch # [osx and x86_64]
#- patches/amd-roc-2.7.0.diff # [variant != "hcc"]
#- patches/amd-roc-hcc-2.7.0.diff # [variant == "hcc"]
folder: .
Expand Down
11 changes: 11 additions & 0 deletions recipe/patches/disable-wundef-prefix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- lib/Driver/ToolChains/Darwin.cpp.orig 2020-11-17 21:12:24.000000000 +0100
+++ lib/Driver/ToolChains/Darwin.cpp 2020-11-17 21:12:37.000000000 +0100
@@ -960,7 +960,7 @@

void DarwinClang::addClangWarningOptions(ArgStringList &CC1Args) const {
// Always error about undefined 'TARGET_OS_*' macros.
- CC1Args.push_back("-Wundef-prefix=TARGET_OS_");
+ CC1Args.push_back("-Wundef-prefix=TARGET_OS_OSX");
CC1Args.push_back("-Werror=undef-prefix");

// For modern targets, promote certain warnings to errors.

0 comments on commit 234a25c

Please sign in to comment.