Mac GN: Build flag differences in //third_party/webrtc |
|||||||
Issue descriptionIn comparing the Mac GN and Mac GYP builds, I found the following differences in compilation flags: Missing in GN compared to GYP: -Wextra -msse2 (only for third_party/webrtc/modules/desktop_capture/differ_block_sse2.cc) New in GN compared to GYP: -Wno-uninitialized -Wno-unused-variable If these differences are non-material to your project, you can close this as WontFix. Otherwise, please adjust the flags in BUILD.gn.
,
Jul 7 2016
AFAIK there should not be any differences.
,
Jul 7 2016
Hmm, which target did you build specifically?
Our config("common_config") should add on -WExtra for non-android posix platforms such as mac. I wonder if the particular target you built don't inherit from that config?
,
Jul 7 2016
Provisional cl: https://codereview.webrtc.org/2128813002
,
Jul 7 2016
This was from building the chrome target. It's possible that the building-within-chrome and the standalone build have different flags.
,
Jul 11 2016
Ok!
My CL for fixing the "new" flags worked except for Android. I don't know why it happens though because my patch _removes_ the warning.
FAILED: obj/webrtc/api/libjingle_peerconnection_jni/peerconnection_jni.o
/b/build/slave/cache/cipd/goma/gomacc ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -MMD -MF obj/webrtc/api/libjingle_peerconnection_jni/peerconnection_jni.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_BROWSER_CDMS -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC -DUSE_EXTERNAL_POPUP_MENU=1 -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_SUPERVISED_USERS=1 -DVIDEO_HOLE=1 -DSAFE_BROWSING_DB_REMOTE -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DENABLE_WEBVR -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -DANDROID -DHAVE_SYS_UIO_H -DANDROID_NDK_VERSION=r10e -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D__GNU_SOURCE=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_RESTRICT_LOGGING -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DEXPAT_RELATIVE_PATH -DWEBRTC_BUILD_LIBEVENT -DWEBRTC_ARCH_ARM -DWEBRTC_ARCH_ARM_V7 -DWEBRTC_HAS_NEON -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_ANDROID -I../.. -Igen -I../../third_party/libyuv -I../../third_party/libyuv/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -ffunction-sections -fno-short-enums -finline-limit=64 -march=armv7-a -mfloat-abi=softfp -mthumb -mthumb-interwork -mtune=generic-armv7-a -fno-tree-sra -fno-caller-saves -mfpu=neon -Wall -Werror -Wno-psabi -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Os -fomit-frame-pointer -fno-ident -fdata-sections -ffunction-sections -g2 --sysroot=../../third_party/android_tools/ndk/platforms/android-16/arch-arm -fvisibility=hidden -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -fno-builtin-cos -fno-builtin-sin -fno-builtin-cosf -fno-builtin-sinf -Wno-sign-compare -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wno-narrowing -fno-rtti -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/include -isystem../../third_party/android_tools/ndk/sources/android/support/include -fno-exceptions -Wnon-virtual-dtor -Woverloaded-virtual -c ../../webrtc/api/android/jni/peerconnection_jni.cc -o obj/webrtc/api/libjingle_peerconnection_jni/peerconnection_jni.o
../../webrtc/api/android/jni/peerconnection_jni.cc: In function 'void webrtc_jni::Java_org_webrtc_Logging_nativeEnableTracing(JNIEnv*, jclass, jstring, jint)':
../../webrtc/api/android/jni/peerconnection_jni.cc:897:34: error: unused variable 'g_trace_callback' [-Werror=unused-variable]
static LogcatTraceContext* g_trace_callback = new LogcatTraceContext();
^
cc1plus: all warnings being treated as errors
,
Jul 11 2016
Oh, wait, adding the flag turns off the warning. Ok, got it.
,
Jul 29 2016
Maybe you can fix the warning on android? What's the status here?
,
Aug 1 2016
Reassigning to Edward since Patrik is now on vacation. This should be addressed as part of our GN migration which will happen in August (tracked in https://bugs.webrtc.org/5949). rsesek: may I ask what tool or collection of commands you're using when doing this comparison? I've considered adding something to the bots but I leaning towards doing a one-time audit instead since the cost of implementing something automated seemed pretty high.
,
Aug 1 2016
I used the gyp_flag_comparison script like so:
% PYTHONPATH=tools/gn/bin python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gyp_flag_compare as fc
>>> import sys
>>> import pprint
>>> sys.displayhook = pprint.pprint
>>> fc.ConfigureBuild(
... ['disable_nacl=1', 'buildtype=Official', 'branding=Chrome'],
... ['enable_nacl=false', 'is_official_build=true',
... 'is_chrome_branded=true'])
Regenerating in out/gn_flags...
gn gen out/gn_flags --args="is_debug=false is_component_build=false enable_nacl=false is_official_build=true is_chrome_branded=true"
Regenerating in out_gyp_flags/Release...
python build/gyp_chromium -Goutput_dir=out_gyp_flags -Gconfig=Release -Ddisable_nacl=1 -Dbuildtype=Official -Dbranding=Chrome
None
>>> chrome = fc.Comparison('chrome')
ninja -C out/gn_flags -t commands chrome
ninja -C out_gyp_flags/Release -t commands chrome
>>> fc.Counts(chrome.missing_in_gyp['other'])
{'-Xclang -add-plugin': 430,
'-Xclang -load': 430,
'-Xclang -plugin-arg-find-bad-constructs': 430,
'-Xclang /Volumes/Build/src/third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib': 3052,
'-Xclang /Volumes/Build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib': 430,
'-Xclang check-implicit-copy-ctors': 430,
'-Xclang check-templates': 430,
'-Xclang find-bad-constructs': 430,
'-Xclang follow-macro-expansion': 430,
'-include': 14,
'-mavx2': 1,
'-msse2': 1,
'-w': 23,
'obj/sdch/sdch.logging_forward.h-cc': 12,
'obj/third_party/WebKit/Source/build/mac/blink_platform.Prefix.h-cc': 536,
'obj/third_party/WebKit/Source/build/mac/blink_platform.Prefix.h-mm': 18,
'obj/third_party/WebKit/Source/build/mac/webcore_dom.Prefix.h-cc': 242,
'obj/third_party/WebKit/Source/build/mac/webcore_generated.Prefix.h-cc': 99,
'obj/third_party/WebKit/Source/build/mac/webcore_html.Prefix.h-cc': 247,
'obj/third_party/WebKit/Source/build/mac/webcore_remaining.Prefix.h-cc': 743,
'obj/third_party/WebKit/Source/build/mac/webcore_remaining.Prefix.h-mm': 1,
'obj/third_party/WebKit/Source/build/mac/webcore_rendering.Prefix.h-cc': 167,
'obj/third_party/WebKit/Source/build/mac/webcore_rendering.Prefix.h-mm': 1,
'obj/third_party/WebKit/Source/build/mac/webcore_svg.Prefix.h-cc': 198}
>>> chrome.missing_in_gyp['other']['-msse2']
['/Volumes/Build/src/third_party/webrtc/modules/desktop_capture/differ_block_sse2.cc']
>>> fc.CountsByDirname(chrome.missing_in_gn['warnings']['-Wno-unused-variable'])
{'/Volumes/Build/src/third_party/sfntly/src/cpp/src/sample/chromium': 2,
'/Volumes/Build/src/third_party/sfntly/src/cpp/src/sfntly': 3,
'/Volumes/Build/src/third_party/sfntly/src/cpp/src/sfntly/data': 8,
'/Volumes/Build/src/third_party/sfntly/src/cpp/src/sfntly/port': 4,
'/Volumes/Build/src/third_party/sfntly/src/cpp/src/sfntly/table': 7,
'/Volumes/Build/src/third_party/sfntly/src/cpp/src/sfntly/table/bitmap': 17,
'/Volumes/Build/src/third_party/sfntly/src/cpp/src/sfntly/table/core': 8,
'/Volumes/Build/src/third_party/sfntly/src/cpp/src/sfntly/table/truetype': 2,
'/Volumes/Build/src/third_party/webrtc/base': 72,
'/Volumes/Build/src/third_party/webrtc/pc': 10}
,
Aug 31 2016
Edward, can you provide an update on this since we've been starting to audit these kind of things. If it's still valid, we should try to identify what's going on with this -msse2 flag
,
Aug 31 2016
The thing with the mmse2 flag was addressed in https://codereview.webrtc.org/2247293002/ I wonder why it didn't post a message here.
,
Aug 31 2016
Re #12: I filed bug 642755 to ask figure out what's up with bugdroid. Could you run a similar run as rsesek@ did above in Chromium, to see if we can mark this bug as fixed?
,
Sep 22 2016
ping?
,
Sep 22 2016
,
Oct 18 2016
Edward, can we close this or do we need to repeat the run I requested in #13 to ensure we don't differ?
,
Oct 18 2016
I don't think we can run this anymore. I'm fairly sure we can close this now.
,
Oct 18 2016
Ok.
,
Nov 15 2016
[bulk-edit : please ignore if not applicable] Could you please set the correct milestone for this issue?
,
Nov 15 2016
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by kjellander@chromium.org
, Jul 6 2016