| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b55e2b1 commit 0d017ec
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,6 +35,32 @@ if [ "$ARCH" = "s390x" ] || [ "$ARCH" = "ppc64le" ]; then | |||
| 35 | 35 | GN_COMPILER_OPTS="is_clang=true clang_base_path=\"/usr\" clang_use_chrome_plugins=false treat_warnings_as_errors=false use_custom_libcxx=false clang_version=\"${CLANG_VERSION}\"" | |
| 36 | 36 | GN_RUST_ARGS="rustc_version=\"${RUST_VERSION}\" rust_sysroot_absolute=\"/usr\" rust_bindgen_root=\"/usr\"" | |
| 37 | 37 | export RUSTC_BOOTSTRAP=1 | |
| 38 | + | ||
| 39 | + # Filter out options supported in clang >= 20 when using clang 19. | ||
| 40 | + if [ "${CLANG_VERSION}" -eq "19" ]; then | ||
| 41 | + find build/ \( -name "*.gn" -o -name "*.gni" \) -exec sed -i \ | ||
| 42 | + -e '/-Wno-nontrivial-memcall/d' {} \; | ||
| 43 | + fi | ||
| 44 | + # Filter out compiler options not supported by non-nightly clang builds | ||
| 45 | + if [ "${CLANG_VERSION}" -ge "19" ]; then | ||
| 46 | + find build/ \( -name "*.gn" -o -name "*.gni" \) -exec sed -i \ | ||
| 47 | + -e '/-Wno-unsafe-buffer-usage-in-static-sized-array/d' \ | ||
| 48 | + -e '/-Wno-uninitialized-const-pointer/d' \ | ||
| 49 | + -e '/-Wno-unused-but-set-global/d' \ | ||
| 50 | + -e '/-fno-lifetime-dse/d' \ | ||
| 51 | + -e '/-fsanitize-ignore-for-ubsan-feature/d' \ | ||
| 52 | + -e '/-fdiagnostics-show-inlining-chain/d' {} \; | ||
| 53 | + fi | ||
| 54 | + # Patch to match libadler/libadler2 based on what is present. | ||
| 55 | + LIBADLER=$(basename "$(find "$(rustc --print sysroot)/lib/rustlib/" -type f -name "libadler*")" | cut -d '-' -f 1) || true | ||
| 56 | + case "$LIBADLER" in | ||
| 57 | + libadler2) sed -i -e 's/"adler"/"adler2"/g' build/rust/std/BUILD.gn | ||
| 58 | + ;; | ||
| 59 | + libadler) sed -i -e 's/"adler2"/"adler"/g' build/rust/std/BUILD.gn | ||
| 60 | + ;; | ||
| 61 | + *) echo "Warning: unable to detect libadler/libadler2 (found ${LIBADLER})" | ||
| 62 | + ;; | ||
| 63 | + esac | ||
| 38 | 64 | ;; | |
| 39 | 65 | *) GN_COMPILER_OPTS="treat_warnings_as_errors=false use_custom_libcxx=false" ;; | |
| 40 | 66 | esac | |
| Back | FazBrowse Home | New Git URL |
0 commit comments