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

Issue 794959 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

-Wunguarded-availability is not triggering in the WebRTC iOS build

Project Member Reported by mbonadei@chromium.org, Dec 14 2017

Issue description

Hi,

in https://chromium-review.googlesource.com/c/chromium/src/+/812212 the -Wunguarded-visibility has been added to all the iOS builds.

The WebRTC file sdk/objc/Framework/Classes/Common/helpers.mm [1] uses 'lowPowerModeEnabled', but it this is only available starting from iOS 9.0. Why the compiler is not generating any warning?

Here is the compilation of line for sdk/objc/Framework/Classes/Common/helpers.mm.

[206/368] ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/sdk/common_objc/helpers.o.d -DV8_DEPRECATION_WARNINGS -DNO_TCMALLOC -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DCR_XCODE_VERSION=0900 -DCR_CLANG_REVISION=\"318667-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DWEBRTC_ENABLE_PROTOBUF=1 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DHAVE_SCTP -DWEBRTC_ARCH_ARM64 -DWEBRTC_HAS_NEON -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=1 -DWEBRTC_POSIX -DWEBRTC_MAC -DWEBRTC_IOS -I../.. -Igen -I../../sdk/objc/Framework/Classes -I../../sdk/objc/Framework/Classes/Audio -I../../sdk/objc/Framework/Classes/Common -I../../sdk/objc/Framework/Classes/Metal -I../../sdk/objc/Framework/Classes/PeerConnection -I../../sdk/objc/Framework/Classes/UI -I../../sdk/objc/Framework/Classes/Video -I../../sdk/objc/Framework/Classes/VideoToolbox -I../../sdk/objc/Framework/Headers -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -no-canonical-prefixes -arch arm64 -Wall -Werror -Wextra -Wunguarded-availability -Wundeclared-selector -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-tautological-constant-compare -Wtautological-constant-out-of-range-compare -O0 -fno-omit-frame-pointer -gdwarf-2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk -stdlib=libc++ -miphoneos-version-min=10.0 -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wc++11-narrowing -Wimplicit-fallthrough -Wthread-safety -Winconsistent-missing-override -Wundef -Wunused-lambda-capture -Wstrict-overflow -Wmissing-field-initializers -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++11 -fobjc-call-cxx-cdtors -Wobjc-missing-property-synthesis -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -fobjc-arc -c ../../sdk/objc/Framework/Classes/Common/helpers.mm -o obj/sdk/common_objc/helpers.o

And this is the description of the target that contains sdk/objc/Framework/Classes/Common/helpers.mm:

$ gn desc out/ios_arm64 sdk:common_objc
Target //sdk:common_objc
Type: static_library
Toolchain: //build/toolchain/mac:ios_clang_arm64

[...]

sources
  [...]
  //sdk/objc/Framework/Classes/Common/helpers.mm
  [...]

[...]

configs (in order applying, try also --tree)
  //build/config:feature_flags
  //build/config/compiler:afdo
  //build/config/compiler:compiler
  //build/config/compiler:clang_stackrealign
  //build/config/compiler:compiler_arm_fpu
  //build/config/compiler:compiler_arm_thumb
  //build/config/compiler:chromium_code
  //build/config/compiler:default_include_dirs
  //build/config/compiler:default_optimization
  //build/config/compiler:default_stack_frames
  //build/config/compiler:default_symbols
  //build/config/compiler:no_exceptions
  //build/config/compiler:no_rtti
  //build/config/compiler:runtime_library
  //build/config/coverage:default_coverage
  //build/config/sanitizers:default_sanitizer_flags
  //build/config/gcc:symbol_visibility_hidden
  //build/config/clang:find_bad_constructs
  //build/config/clang:extra_warnings
  //build/config:debug
  //:common_config
  //build/config/compiler:enable_arc
  //:common_objc
  //:common_inherited_config
  //sdk:common_config_objc
  //rtc_base:rtc_base_all_dependent_config

public_configs (in order applying, try also --tree)
  //:common_inherited_config
  //sdk:common_config_objc

all_dependent_configs (in order applying, try also --tree)
  //rtc_base:rtc_base_all_dependent_config

outputs
  //out/ios_arm64/obj/sdk/libcommon_objc.a

asmflags
  -fno-strict-aliasing
  --param=ssp-buffer-size=4
  -fstack-protector
  -Wno-builtin-macro-redefined
  -D__DATE__=
  -D__TIME__=
  -D__TIMESTAMP__=
  -fcolor-diagnostics
  -no-canonical-prefixes
  -std=c11
  -arch
  arm64
  -gdwarf-2
  -isysroot
  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk
  -stdlib=libc++
  -miphoneos-version-min=10.0

cflags
  -fno-strict-aliasing
  --param=ssp-buffer-size=4
  -fstack-protector
  -Wno-builtin-macro-redefined
  -D__DATE__=
  -D__TIME__=
  -D__TIMESTAMP__=
  -fcolor-diagnostics
  -no-canonical-prefixes
  -arch
  arm64
  -Wall
  -Werror
  -Wextra
  -Wunguarded-availability
  -Wundeclared-selector
  -Wno-missing-field-initializers
  -Wno-unused-parameter
  -Wno-c++11-narrowing
  -Wno-covered-switch-default
  -Wno-unneeded-internal-declaration
  -Wno-inconsistent-missing-override
  -Wno-undefined-var-template
  -Wno-nonportable-include-path
  -Wno-address-of-packed-member
  -Wno-unused-lambda-capture
  -Wno-user-defined-warnings
  -Wno-enum-compare-switch
  -Wno-tautological-unsigned-zero-compare
  -Wno-null-pointer-arithmetic
  -Wno-tautological-constant-compare
  -Wtautological-constant-out-of-range-compare
  -O0
  -fno-omit-frame-pointer
  -gdwarf-2
  -isysroot
  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk
  -stdlib=libc++
  -miphoneos-version-min=10.0
  -fvisibility=hidden
  -Xclang
  -load
  -Xclang
  ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib
  -Xclang
  -add-plugin
  -Xclang
  find-bad-constructs
  -Wheader-hygiene
  -Wstring-conversion
  -Wtautological-overlap-compare
  -Wextra
  -Wno-unused-parameter
  -Wno-missing-field-initializers
  -Wno-strict-overflow
  -Wc++11-narrowing
  -Wimplicit-fallthrough
  -Wthread-safety
  -Winconsistent-missing-override
  -Wundef
  -Wunused-lambda-capture
  -Wstrict-overflow
  -Wmissing-field-initializers

cflags_c
  -std=c11

cflags_cc
  -Wno-undefined-bool-conversion
  -Wno-tautological-undefined-compare
  -std=c++11
  -fno-exceptions
  -fno-rtti
  -fvisibility-inlines-hidden
  -Wnon-virtual-dtor
  -Woverloaded-virtual

cflags_objc
  -std=c11
  -Wobjc-missing-property-synthesis
  -fobjc-arc

cflags_objcc
  -Wno-undefined-bool-conversion
  -Wno-tautological-undefined-compare
  -std=c++11
  -fobjc-call-cxx-cdtors
  -Wobjc-missing-property-synthesis
  -fno-exceptions
  -fno-rtti
  -fvisibility-inlines-hidden
  -fobjc-arc

defines
  V8_DEPRECATION_WARNINGS
  NO_TCMALLOC
  CHROMIUM_BUILD
  FIELDTRIAL_TESTING_ENABLED
  CR_XCODE_VERSION=0900
  CR_CLANG_REVISION="318667-1"
  __STDC_CONSTANT_MACROS
  __STDC_FORMAT_MACROS
  _DEBUG
  DYNAMIC_ANNOTATIONS_ENABLED=1
  WTF_USE_DYNAMIC_ANNOTATIONS=1
  WEBRTC_ENABLE_PROTOBUF=1
  WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE
  HAVE_SCTP
  WEBRTC_ARCH_ARM64
  WEBRTC_HAS_NEON
  WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=1
  WEBRTC_POSIX
  WEBRTC_MAC
  WEBRTC_IOS

[...]

[1] - https://webrtc.googlesource.com/src/+/master/sdk/objc/Framework/Classes/Common/helpers.mm
 
Cc: dpranke@chromium.org brettw@chromium.org
Owner: justincohen@chromium.org
Status: Assigned (was: Untriaged)
Assigning to Justin who wrote the CL.
Status: WontFix (was: Assigned)
iphoneos-version-min is set to 10.0, why would you expect a warning?
Oh, I see. Sorry about this, I just got confused and reached the wrong conclusion. :/

Sign in to add a comment