Skip to content

Commit

Permalink
[gdk-pixbuf] remove clang exception
Browse files Browse the repository at this point in the history
  • Loading branch information
planetmarshall committed Jun 29, 2022
1 parent 610d38b commit 81524c2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
18 changes: 10 additions & 8 deletions recipes/gdk-pixbuf/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from conans import ConanFile, Meson, tools
from conans import ConanFile, CMake, Meson, tools
from conans.errors import ConanInvalidConfiguration
from tempfile import TemporaryDirectory
import functools
import os
import shutil
Expand Down Expand Up @@ -57,12 +58,7 @@ def configure(self):
self.options["glib"].shared = True

def requirements(self):
if self.settings.compiler == "clang":
# FIXME: cannot bump glib due to "undefined reference to `__muloti4'"
# see https://github.com/conan-io/conan-center-index/pull/10154#issuecomment-1094224794
self.requires("glib/2.70.4")
else:
self.requires("glib/2.73.0")
self.requires("glib/2.73.0")
if self.options.with_libpng:
self.requires("libpng/1.6.37")
if self.options.with_libtiff:
Expand Down Expand Up @@ -130,7 +126,12 @@ def _configure_meson(self):
defs["builtin_loaders"] = "all"
defs["gio_sniffing"] = "false"
defs["introspection"] = "enabled" if self.options.with_introspection else "disabled"
args=[]
args = []
# Workaround for https://bugs.llvm.org/show_bug.cgi?id=16404
# Ony really for the purporses of building on CCI - end users can
# workaround this by appropriately setting global linker flags in their profile
if self.settings.compiler == "clang":
args.append('-Dc_link_args="-rtlib=compiler-rt"')
args.append("--wrap-mode=nofallback")
meson.configure(defs=defs, build_folder=self._build_subfolder, source_folder=self._source_subfolder, pkg_config_paths=".", args=args)
return meson
Expand All @@ -139,6 +140,7 @@ def build(self):
self._patch_sources()
if self.options.with_libpng:
shutil.copy("libpng.pc", "libpng16.pc")

meson = self._configure_meson()
meson.build()

Expand Down
11 changes: 9 additions & 2 deletions recipes/gdk-pixbuf/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ class TestPackageConan(ConanFile):

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
compiler_env = {}
# Workaround for https://bugs.llvm.org/show_bug.cgi?id=16404
# Ony really for the purporses of building on CCI - end users can
# workaround this by appropriately setting global linker flags in their profile
if self.settings.compiler == "clang":
compiler_env = {"LDFLAGS": "-rtlib=compiler-rt"}
with tools.environment_append(compiler_env):
cmake.configure()
cmake.build()

def test(self):
if not tools.cross_building(self):
Expand Down

0 comments on commit 81524c2

Please sign in to comment.