From 2ac5f1cea8beaa1807a4dce3062b981ca8779b9e Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Tue, 18 Feb 2025 10:16:15 +0900 Subject: [PATCH] [ci] Change llvm-12 to llvm-17 (#81) --- .github/workflows/build.yml | 6 +++--- README.md | 10 +++++----- build/config/BUILD.gn | 33 ++++++++++----------------------- build/config/BUILDCONFIG.gn | 2 +- 4 files changed, 19 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4cd9dc..c40e93b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y clang-12 rpm2cpio cpio binutils-${{ matrix.triple }} + sudo apt-get install -y clang-17 rpm2cpio cpio binutils-${{ matrix.triple }} - name: Install depot_tools run: | @@ -56,7 +56,7 @@ jobs: run: | src/tools/gn \ --target-cpu ${{ matrix.arch }} \ - --target-toolchain /usr/lib/llvm-12 \ + --target-toolchain /usr/lib/llvm-17 \ --target-sysroot src/sysroot-6.0/${{ matrix.arch }} \ --target-dir build ninja -C src/out/build @@ -66,7 +66,7 @@ jobs: run: | src/tools/gn \ --target-cpu ${{ matrix.arch }} \ - --target-toolchain /usr/lib/llvm-12 \ + --target-toolchain /usr/lib/llvm-17 \ --target-sysroot src/sysroot-6.5/${{ matrix.arch }} \ --api-version 6.5 \ --target-dir build diff --git a/README.md b/README.md index 0f2eaca..178df73 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ The Flutter embedder for Tizen. - Linux (x64) - [depot_tools](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) -- [LLVM](https://apt.llvm.org) (10 or later) - - `sudo apt install clang-12` +- [LLVM](https://apt.llvm.org) (17 or later) + - `sudo apt install clang-17` - Additional dependencies - `sudo apt install git python3 rpm2cpio cpio` - `sudo apt install binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu binutils-i686-linux-gnu` @@ -37,21 +37,21 @@ The Flutter embedder for Tizen. - **For arm** ```sh - tools/gn --target-cpu arm --target-toolchain /usr/lib/llvm-12 + tools/gn --target-cpu arm --target-toolchain /usr/lib/llvm-17 ninja -C out/tizen_arm ``` - **For arm64** ```sh - tools/gn --target-cpu arm64 --target-toolchain /usr/lib/llvm-12 + tools/gn --target-cpu arm64 --target-toolchain /usr/lib/llvm-17 ninja -C out/tizen_arm64 ``` - **For x86** ```sh - tools/gn --target-cpu x86 --target-toolchain /usr/lib/llvm-12 + tools/gn --target-cpu x86 --target-toolchain /usr/lib/llvm-17 ninja -C out/tizen_x86 ``` diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 7b2f9e7..3eb0293 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -37,7 +37,11 @@ config("compiler") { # Stack protection. cflags += [ "-fstack-protector", - "--param=ssp-buffer-size=4", + + # 8 is the default, but make this explicit here so that we don't have to + # go hunting for the flag name if we ever want a value that is + # different from the default. + "--param=ssp-buffer-size=8", ] # Cross compilation. @@ -75,24 +79,15 @@ config("compiler") { "-Werror", "-Wno-missing-field-initializers", "-Wno-unused-parameter", + "-Wno-unused-but-set-parameter", + "-Wno-unused-but-set-variable", "-Wno-implicit-int-float-conversion", - "-Wno-c99-designator", "-Wno-deprecated-copy", + "-Wno-psabi", + "-Wno-unqualified-std-cast-call", + "-Wno-non-c-typedef-for-linkage", "-Wno-range-loop-construct", ] - if (clang_version >= 11) { - cflags += [ "-Wno-psabi" ] - } - if (clang_version >= 14) { - cflags += [ - "-Wno-unused-but-set-parameter", - "-Wno-unused-but-set-variable", - "-Wno-non-c-typedef-for-linkage", - ] - } - if (clang_version >= 15) { - cflags += [ "-Wno-unqualified-std-cast-call" ] - } # Extra warnings. cflags += [ @@ -108,14 +103,6 @@ config("cxx_version_default") { cflags_cc = [ "-std=c++17" ] } -config("cxx_version_11") { - cflags_cc = [ "-std=c++11" ] -} - -config("cxx_version_20") { - cflags_cc = [ "-std=c++20" ] -} - config("no_system_cxx") { cflags_cc = [ "-nostdinc++" ] ldflags = [ "-nostdlib++" ] diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index b6783f1..65876b3 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -24,7 +24,7 @@ declare_args() { target_triple = "" # The compiler version. - clang_version = 10 + clang_version = 17 # The target API version. api_version = ""