[arch-commits] Commit in chromium/trunk (PKGBUILD)

Evangelos Foutras foutrelis at archlinux.org
Sat Nov 18 22:02:51 UTC 2017


    Date: Saturday, November 18, 2017 @ 22:02:50
  Author: foutrelis
Revision: 310400

upgpkg: chromium 62.0.3202.94-2

Use clang to build Chromium in order to better align ourselves with
upstream -- using GCC is considered unsupported and official Chrome
builds have been using clang for quite a while.

This will hopefully avoid bugs caused by undefined behavior (FS#56366).

Modified:
  chromium/trunk/PKGBUILD

----------+
 PKGBUILD |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-11-18 21:13:42 UTC (rev 310399)
+++ PKGBUILD	2017-11-18 22:02:50 UTC (rev 310400)
@@ -6,7 +6,7 @@
 
 pkgname=chromium
 pkgver=62.0.3202.94
-pkgrel=1
+pkgrel=2
 _launcher_ver=5
 pkgdesc="A web browser built for speed, simplicity, and security"
 arch=('x86_64')
@@ -15,7 +15,7 @@
 depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
          'ttf-font' 'systemd' 'dbus' 'libpulse' 'pciutils' 'json-glib'
          'desktop-file-utils' 'hicolor-icon-theme')
-makedepends=('python2' 'gperf' 'yasm' 'mesa' 'ninja' 'nodejs' 'git')
+makedepends=('python2' 'gperf' 'yasm' 'mesa' 'ninja' 'nodejs' 'git' 'clang')
 optdepends=('pepper-flash: support for Flash content'
             'kdialog: needed for file dialogs in KDE'
             'gnome-keyring: for storing passwords in GNOME keyring'
@@ -93,6 +93,9 @@
   # Fixes from Gentoo
   patch -Np1 -i ../chromium-gn-bootstrap-r17.patch
 
+  # Remove compiler flag not supported by our system clang
+  sed -i '/"-Wno-enum-compare-switch",/d' build/config/compiler/BUILD.gn
+
   # Use Python 2
   find . -name '*.py' -exec sed -i -r 's|/usr/bin/python$|&2|g' {} +
 
@@ -129,8 +132,15 @@
   export TMPDIR="$srcdir/temp"
   mkdir -p "$TMPDIR"
 
+  export CC=clang
+  export CXX=clang++
+  export AR=ar
+  export NM=nm
+
   local _flags=(
-    'is_clang=false'
+    'custom_toolchain="//build/toolchain/linux/unbundle:default"'
+    'host_toolchain="//build/toolchain/linux/unbundle:default"'
+    'is_clang=true'
     'clang_use_chrome_plugins=false'
     'is_debug=false'
     'fatal_linker_warnings=false'



More information about the arch-commits mailing list