chore: suppress noisy macos third-party build warnings
This commit is contained in:
parent
6f66fd44bc
commit
4763e7853b
@ -38,10 +38,45 @@ end
|
|||||||
post_install do |installer|
|
post_install do |installer|
|
||||||
append_ignored_attributes_suppression = lambda do |build_settings|
|
append_ignored_attributes_suppression = lambda do |build_settings|
|
||||||
other_cflags = build_settings['OTHER_CFLAGS'] || '$(inherited)'
|
other_cflags = build_settings['OTHER_CFLAGS'] || '$(inherited)'
|
||||||
return if other_cflags.include?('-Wno-ignored-attributes')
|
other_cxxflags = build_settings['OTHER_CPLUSPLUSFLAGS'] || '$(inherited)'
|
||||||
|
updated = false
|
||||||
|
|
||||||
build_settings['OTHER_CFLAGS'] =
|
unless other_cflags.include?('-Wno-ignored-attributes')
|
||||||
"#{other_cflags} -Wno-ignored-attributes"
|
build_settings['OTHER_CFLAGS'] =
|
||||||
|
"#{other_cflags} -Wno-ignored-attributes"
|
||||||
|
updated = true
|
||||||
|
end
|
||||||
|
|
||||||
|
unless other_cxxflags.include?('-Wno-ignored-attributes')
|
||||||
|
build_settings['OTHER_CPLUSPLUSFLAGS'] =
|
||||||
|
"#{other_cxxflags} -Wno-ignored-attributes"
|
||||||
|
updated = true
|
||||||
|
end
|
||||||
|
|
||||||
|
updated
|
||||||
|
end
|
||||||
|
|
||||||
|
append_deprecation_suppression = lambda do |build_settings|
|
||||||
|
other_cflags = build_settings['OTHER_CFLAGS'] || '$(inherited)'
|
||||||
|
other_cxxflags = build_settings['OTHER_CPLUSPLUSFLAGS'] || '$(inherited)'
|
||||||
|
|
||||||
|
unless other_cflags.include?('-Wno-deprecated-declarations')
|
||||||
|
build_settings['OTHER_CFLAGS'] =
|
||||||
|
"#{other_cflags} -Wno-deprecated-declarations"
|
||||||
|
end
|
||||||
|
|
||||||
|
unless other_cxxflags.include?('-Wno-deprecated-declarations')
|
||||||
|
build_settings['OTHER_CPLUSPLUSFLAGS'] =
|
||||||
|
"#{other_cxxflags} -Wno-deprecated-declarations"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
append_linker_warning_suppression = lambda do |build_settings|
|
||||||
|
other_ldflags = build_settings['OTHER_LDFLAGS'] || '$(inherited)'
|
||||||
|
return if other_ldflags.include?('-Wl,-w')
|
||||||
|
|
||||||
|
build_settings['OTHER_LDFLAGS'] =
|
||||||
|
"#{other_ldflags} -Wl,-w"
|
||||||
end
|
end
|
||||||
|
|
||||||
normalize_system_framework_refs = lambda do |project|
|
normalize_system_framework_refs = lambda do |project|
|
||||||
@ -56,10 +91,16 @@ post_install do |installer|
|
|||||||
|
|
||||||
installer.pods_project.targets.each do |target|
|
installer.pods_project.targets.each do |target|
|
||||||
flutter_additional_macos_build_settings(target)
|
flutter_additional_macos_build_settings(target)
|
||||||
next unless target.name == 'mobile_scanner'
|
|
||||||
|
|
||||||
target.build_configurations.each do |config|
|
target.build_configurations.each do |config|
|
||||||
|
config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '11.5'
|
||||||
|
|
||||||
|
next unless ['mobile_scanner', 'patrol', 'CocoaAsyncSocket', 'Pods-Runner', 'Pods-RunnerTests'].include?(target.name)
|
||||||
|
|
||||||
append_ignored_attributes_suppression.call(config.build_settings)
|
append_ignored_attributes_suppression.call(config.build_settings)
|
||||||
|
append_deprecation_suppression.call(config.build_settings)
|
||||||
|
append_linker_warning_suppression.call(config.build_settings)
|
||||||
|
config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = 'YES'
|
||||||
|
config.build_settings['SWIFT_SUPPRESS_WARNINGS'] = 'YES'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -69,6 +110,7 @@ post_install do |installer|
|
|||||||
|
|
||||||
target.build_configurations.each do |config|
|
target.build_configurations.each do |config|
|
||||||
append_ignored_attributes_suppression.call(config.build_settings)
|
append_ignored_attributes_suppression.call(config.build_settings)
|
||||||
|
append_linker_warning_suppression.call(config.build_settings)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
aggregate_target.user_project.save
|
aggregate_target.user_project.save
|
||||||
|
|||||||
@ -376,6 +376,7 @@
|
|||||||
};
|
};
|
||||||
33CC111E2044C6BF0003C045 /* ShellScript */ = {
|
33CC111E2044C6BF0003C045 /* ShellScript */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
@ -435,6 +436,7 @@
|
|||||||
};
|
};
|
||||||
A1B2C3074F0A000100000001 /* Generate Missing Framework dSYMs */ = {
|
A1B2C3074F0A000100000001 /* Generate Missing Framework dSYMs */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
@ -536,6 +538,14 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-Wno-ignored-attributes",
|
"-Wno-ignored-attributes",
|
||||||
);
|
);
|
||||||
|
OTHER_CPLUSPLUSFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wno-ignored-attributes",
|
||||||
|
);
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wl,-w",
|
||||||
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = plus.svc.xworkmate.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = plus.svc.xworkmate.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@ -556,6 +566,14 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-Wno-ignored-attributes",
|
"-Wno-ignored-attributes",
|
||||||
);
|
);
|
||||||
|
OTHER_CPLUSPLUSFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wno-ignored-attributes",
|
||||||
|
);
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wl,-w",
|
||||||
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = plus.svc.xworkmate.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = plus.svc.xworkmate.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@ -576,6 +594,14 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-Wno-ignored-attributes",
|
"-Wno-ignored-attributes",
|
||||||
);
|
);
|
||||||
|
OTHER_CPLUSPLUSFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wno-ignored-attributes",
|
||||||
|
);
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wl,-w",
|
||||||
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = plus.svc.xworkmate.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = plus.svc.xworkmate.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@ -665,6 +691,14 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-Wno-ignored-attributes",
|
"-Wno-ignored-attributes",
|
||||||
);
|
);
|
||||||
|
OTHER_CPLUSPLUSFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wno-ignored-attributes",
|
||||||
|
);
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wl,-w",
|
||||||
|
);
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
RUNTIME_EXCEPTION_ALLOW_JIT = YES;
|
RUNTIME_EXCEPTION_ALLOW_JIT = YES;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@ -819,6 +853,14 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-Wno-ignored-attributes",
|
"-Wno-ignored-attributes",
|
||||||
);
|
);
|
||||||
|
OTHER_CPLUSPLUSFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wno-ignored-attributes",
|
||||||
|
);
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wl,-w",
|
||||||
|
);
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
RUNTIME_EXCEPTION_ALLOW_JIT = YES;
|
RUNTIME_EXCEPTION_ALLOW_JIT = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@ -851,6 +893,14 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-Wno-ignored-attributes",
|
"-Wno-ignored-attributes",
|
||||||
);
|
);
|
||||||
|
OTHER_CPLUSPLUSFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wno-ignored-attributes",
|
||||||
|
);
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-Wl,-w",
|
||||||
|
);
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
RUNTIME_EXCEPTION_ALLOW_JIT = YES;
|
RUNTIME_EXCEPTION_ALLOW_JIT = YES;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
@ -38,5 +38,12 @@ for framework in "${frameworks_dir}"/*.framework; do
|
|||||||
|
|
||||||
echo "Generating missing dSYM for ${framework_name}"
|
echo "Generating missing dSYM for ${framework_name}"
|
||||||
rm -rf "${dsym_path}"
|
rm -rf "${dsym_path}"
|
||||||
xcrun dsymutil "${binary_path}" -o "${dsym_path}"
|
uuid_output="$(xcrun dwarfdump --uuid "${binary_path}" 2>/dev/null || true)"
|
||||||
|
if [[ -z "${uuid_output}" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! xcrun dsymutil "${binary_path}" -o "${dsym_path}" >/dev/null 2>&1; then
|
||||||
|
rm -rf "${dsym_path}"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user