New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 669076 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Enable -Werror for links in chromecast builds

Project Member Reported by thakis@chromium.org, Nov 28 2016

Issue description

https://codereview.chromium.org/2521913005/ enabled warnings-as-errors for warnings emitted by the compiler driver during links. I had to disable this for is_chromecast builds because 

FAILED: libcast_media_1.0_android.so libcast_media_1.0_android.so.TOC lib.unstripped/libcast_media_1.0_android.so 
python "/b/c/b/cast_shell_android/src/build/toolchain/gcc_solink_wrapper.py" --readelf="../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-readelf" --nm="../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-nm" --strip=../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --sofile="./lib.unstripped/libcast_media_1.0_android.so" --tocfile="./libcast_media_1.0_android.so.TOC" --output="./libcast_media_1.0_android.so"  -- ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed --gcc-toolchain=../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -fuse-ld=gold -Wl,--icf=all -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,--exclude-libs=libgcc.a -Wl,--exclude-libs=libc++_static.a -Wl,--exclude-libs=libvpx_assembly_arm.a --target=arm-linux-androideabi -Werror -nostdlib -Wl,--warn-shared-textrel --sysroot=../../third_party/android_tools/ndk/platforms/android-16/arch-arm  -Wl,-rpath=/oem_cast_shlib -Wl,-rpath=\$ORIGIN/lib -Wl,-rpath=\$ORIGIN -static-libstdc++ -static-libgcc -Wl,--exclude-libs=libffmpeg.a -Wl,--version-script=/b/c/b/cast_shell_android/src/build/android/android_no_jni_exports.lst -Wl,-wrap,calloc -Wl,-wrap,free -Wl,-wrap,malloc -Wl,-wrap,memalign -Wl,-wrap,posix_memalign -Wl,-wrap,pvalloc -Wl,-wrap,realloc -Wl,-wrap,valloc -L../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -o "./lib.unstripped/libcast_media_1.0_android.so" -Wl,-soname="libcast_media_1.0_android.so" @"./libcast_media_1.0_android.so.rsp"
clang: error: argument unused during compilation: '-static-libstdc++' [-Werror,-Wunused-command-line-argument]
clang: error: argument unused during compilation: '-static-libgcc' [-Werror,-Wunused-command-line-argument]



https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/168815/steps/compile%20%28with%20patch%29/logs/stdio

(also see  bug 669072 )


Not sure why these flags are getting ignored. Can someone take a look?
 

Comment 1 by thakis@chromium.org, Nov 28 2016

Ah, it's because -nostdlib already disables linking to these two libs, so the flag really has no effect.
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 28 2016

Comment 4 by thakis@chromium.org, Nov 28 2016

Owner: thakis@chromium.org
Status: Fixed (was: Untriaged)

Sign in to add a comment