Commit 17ca7445 authored by justincohen's avatar justincohen Committed by Commit bot

Remove old iossim code (pre-Xcode 8) and class-dump.

BUG=640559
TBR=brettw

Review-Url: https://codereview.chromium.org/2351613006
Cr-Commit-Position: refs/heads/master@{#419962}
parent a7040a0a
...@@ -321,7 +321,6 @@ vs-chromium-project.txt ...@@ -321,7 +321,6 @@ vs-chromium-project.txt
/third_party/chromeos_login_manager /third_party/chromeos_login_manager
/third_party/chromeos_text_input /third_party/chromeos_text_input
/third_party/chromite /third_party/chromite
/third_party/class-dump/src
/third_party/cld_2/src /third_party/cld_2/src
/third_party/cld_3/src /third_party/cld_3/src
/third_party/colorama/src /third_party/colorama/src
......
...@@ -354,10 +354,6 @@ deps_os = { ...@@ -354,10 +354,6 @@ deps_os = {
'src/third_party/google_toolbox_for_mac/src': 'src/third_party/google_toolbox_for_mac/src':
Var('chromium_git') + '/external/github.com/google/google-toolbox-for-mac.git' + '@' + Var('google_toolbox_for_mac_revision'), Var('chromium_git') + '/external/github.com/google/google-toolbox-for-mac.git' + '@' + Var('google_toolbox_for_mac_revision'),
# class-dump utility to generate header files for undocumented SDKs
'src/third_party/class-dump/src':
Var('chromium_git') + '/external/github.com/nygard/class-dump.git' + '@' + '978d177ca6f0d2e5e34acf3e8dadc63e3140ebbc',
}, },
'mac': { 'mac': {
'src/third_party/google_toolbox_for_mac/src': 'src/third_party/google_toolbox_for_mac/src':
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/mac/mac_sdk.gni") import("//build/config/mac/mac_sdk.gni")
import("//third_party/class-dump/class-dump.gni")
if (current_toolchain == host_toolchain) { if (current_toolchain == host_toolchain) {
config("config") { config("config") {
...@@ -11,10 +10,9 @@ if (current_toolchain == host_toolchain) { ...@@ -11,10 +10,9 @@ if (current_toolchain == host_toolchain) {
include_dirs = [ "$root_gen_dir/iossim" ] include_dirs = [ "$root_gen_dir/iossim" ]
# TODO(crbug.com/595295): Building class-dump tools requires OS X SDK # -objectForKeyedSubscript requires 10.8 or newer. Remove this override once
# version 10.9 or higher. Remove this override once the global version # the global version of the SDK is raised.
# of the SDK is raised. common_flags = [ "-mmacosx-version-min=10.8" ]
common_flags = [ "-mmacosx-version-min=10.9" ]
ldflags = common_flags ldflags = common_flags
cflags_objcc = common_flags cflags_objcc = common_flags
} }
...@@ -24,36 +22,7 @@ if (current_toolchain == host_toolchain) { ...@@ -24,36 +22,7 @@ if (current_toolchain == host_toolchain) {
"iossim.mm", "iossim.mm",
] ]
libs = [ "Foundation.framework" ] libs = [ "Foundation.framework" ]
deps = [
":generate_dvt_core_simulator",
":generate_dvt_foundation_header",
":generate_dvt_iphone_sim_header",
]
configs += [ ":config" ] configs += [ ":config" ]
# TODO(crbug.com/595295): Building class-dump tools requires OS X SDK
# version 10.9 or higher. To prevent mixing code using different value
# of minimum SDK supported, forbids dependencies on any Chromium target.
assert_no_deps = [ "//base/*" ]
}
class_dump("generate_dvt_core_simulator") {
framework_name = "CoreSimulator"
framework_path = "$mac_sdk_path/../../../../../Library/PrivateFrameworks"
class_dump_filter = "Sim"
}
class_dump("generate_dvt_foundation_header") {
framework_name = "DVTFoundation"
framework_path = "$mac_sdk_path/../../../../../../SharedFrameworks"
class_dump_filter = "DVTStackBacktrace|DVTInvalidation|DVTMixIn"
}
class_dump("generate_dvt_iphone_sim_header") {
topological_sort = true
framework_name = "DVTiPhoneSimulatorRemoteClient"
framework_path = "$mac_sdk_path/../../../../../../SharedFrameworks"
class_dump_filter = "iPhoneSimulator"
} }
} else if (current_toolchain == default_toolchain) { } else if (current_toolchain == default_toolchain) {
copy("iossim") { copy("iossim") {
......
This diff is collapsed.
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
config("config") {
visibility = [ ":class-dump" ]
libs = [ "Foundation.framework" ]
# TODO(crbug.com/595295): Building class-dump tools requires OS X SDK
# version 10.9 or higher. Remove this override once the global version
# of the SDK is raised.
common_flags = [ "-mmacosx-version-min=10.9" ]
ldflags = common_flags
cflags_objc = common_flags
cflags_objc += [
"-Wno-semicolon-before-method-body",
"-Wno-unused-function",
]
precompiled_header = "src/class-dump-Prefix.pch"
precompiled_source = "src/class-dump-Prefix.pch"
}
executable("class-dump") {
include_dirs = [ "src/Source" ]
sources = [
"src/Source/CDBalanceFormatter.h",
"src/Source/CDBalanceFormatter.m",
"src/Source/CDClassDump.h",
"src/Source/CDClassDump.m",
"src/Source/CDClassDumpVisitor.h",
"src/Source/CDClassDumpVisitor.m",
"src/Source/CDClassFrameworkVisitor.h",
"src/Source/CDClassFrameworkVisitor.m",
"src/Source/CDDataCursor.h",
"src/Source/CDDataCursor.m",
"src/Source/CDExtensions.h",
"src/Source/CDFatArch.h",
"src/Source/CDFatArch.m",
"src/Source/CDFatFile.h",
"src/Source/CDFatFile.m",
"src/Source/CDFile.h",
"src/Source/CDFile.m",
"src/Source/CDFindMethodVisitor.h",
"src/Source/CDFindMethodVisitor.m",
"src/Source/CDLCDataInCode.h",
"src/Source/CDLCDataInCode.m",
"src/Source/CDLCDyldInfo.h",
"src/Source/CDLCDyldInfo.m",
"src/Source/CDLCDylib.h",
"src/Source/CDLCDylib.m",
"src/Source/CDLCDylinker.h",
"src/Source/CDLCDylinker.m",
"src/Source/CDLCDynamicSymbolTable.h",
"src/Source/CDLCDynamicSymbolTable.m",
"src/Source/CDLCEncryptionInfo.h",
"src/Source/CDLCEncryptionInfo.m",
"src/Source/CDLCFunctionStarts.h",
"src/Source/CDLCFunctionStarts.m",
"src/Source/CDLCLinkeditData.h",
"src/Source/CDLCLinkeditData.m",
"src/Source/CDLCMain.h",
"src/Source/CDLCMain.m",
"src/Source/CDLCPrebindChecksum.h",
"src/Source/CDLCPrebindChecksum.m",
"src/Source/CDLCPreboundDylib.h",
"src/Source/CDLCPreboundDylib.m",
"src/Source/CDLCRoutines32.h",
"src/Source/CDLCRoutines32.m",
"src/Source/CDLCRoutines64.h",
"src/Source/CDLCRoutines64.m",
"src/Source/CDLCRunPath.h",
"src/Source/CDLCRunPath.m",
"src/Source/CDLCSegment.h",
"src/Source/CDLCSegment.m",
"src/Source/CDLCSourceVersion.h",
"src/Source/CDLCSourceVersion.m",
"src/Source/CDLCSubClient.h",
"src/Source/CDLCSubClient.m",
"src/Source/CDLCSubFramework.h",
"src/Source/CDLCSubFramework.m",
"src/Source/CDLCSubLibrary.h",
"src/Source/CDLCSubLibrary.m",
"src/Source/CDLCSubUmbrella.h",
"src/Source/CDLCSubUmbrella.m",
"src/Source/CDLCSymbolTable.h",
"src/Source/CDLCSymbolTable.m",
"src/Source/CDLCTwoLevelHints.h",
"src/Source/CDLCTwoLevelHints.m",
"src/Source/CDLCUUID.h",
"src/Source/CDLCUUID.m",
"src/Source/CDLCUnixThread.h",
"src/Source/CDLCUnixThread.m",
"src/Source/CDLCUnknown.h",
"src/Source/CDLCUnknown.m",
"src/Source/CDLCVersionMinimum.h",
"src/Source/CDLCVersionMinimum.m",
"src/Source/CDLoadCommand.h",
"src/Source/CDLoadCommand.m",
"src/Source/CDMachOFile.h",
"src/Source/CDMachOFile.m",
"src/Source/CDMachOFileDataCursor.h",
"src/Source/CDMachOFileDataCursor.m",
"src/Source/CDMethodType.h",
"src/Source/CDMethodType.m",
"src/Source/CDMultiFileVisitor.h",
"src/Source/CDMultiFileVisitor.m",
"src/Source/CDOCCategory.h",
"src/Source/CDOCCategory.m",
"src/Source/CDOCClass.h",
"src/Source/CDOCClass.m",
"src/Source/CDOCClassReference.h",
"src/Source/CDOCClassReference.m",
"src/Source/CDOCInstanceVariable.h",
"src/Source/CDOCInstanceVariable.m",
"src/Source/CDOCMethod.h",
"src/Source/CDOCMethod.m",
"src/Source/CDOCModule.h",
"src/Source/CDOCModule.m",
"src/Source/CDOCProperty.h",
"src/Source/CDOCProperty.m",
"src/Source/CDOCProtocol.h",
"src/Source/CDOCProtocol.m",
"src/Source/CDOCSymtab.h",
"src/Source/CDOCSymtab.m",
"src/Source/CDObjectiveC1Processor.h",
"src/Source/CDObjectiveC1Processor.m",
"src/Source/CDObjectiveC2Processor.h",
"src/Source/CDObjectiveC2Processor.m",
"src/Source/CDObjectiveCProcessor.h",
"src/Source/CDObjectiveCProcessor.m",
"src/Source/CDProtocolUniquer.h",
"src/Source/CDProtocolUniquer.m",
"src/Source/CDRelocationInfo.h",
"src/Source/CDRelocationInfo.m",
"src/Source/CDSearchPathState.h",
"src/Source/CDSearchPathState.m",
"src/Source/CDSection.h",
"src/Source/CDSection.m",
"src/Source/CDStructureInfo.h",
"src/Source/CDStructureInfo.m",
"src/Source/CDStructureTable.h",
"src/Source/CDStructureTable.m",
"src/Source/CDSymbol.h",
"src/Source/CDSymbol.m",
"src/Source/CDTextClassDumpVisitor.h",
"src/Source/CDTextClassDumpVisitor.m",
"src/Source/CDTopoSortNode.h",
"src/Source/CDTopoSortNode.m",
"src/Source/CDTopologicalSortProtocol.h",
"src/Source/CDType.h",
"src/Source/CDType.m",
"src/Source/CDTypeController.h",
"src/Source/CDTypeController.m",
"src/Source/CDTypeFormatter.h",
"src/Source/CDTypeFormatter.m",
"src/Source/CDTypeLexer.h",
"src/Source/CDTypeLexer.m",
"src/Source/CDTypeName.h",
"src/Source/CDTypeName.m",
"src/Source/CDTypeParser.h",
"src/Source/CDTypeParser.m",
"src/Source/CDVisitor.h",
"src/Source/CDVisitor.m",
"src/Source/CDVisitorPropertyState.h",
"src/Source/CDVisitorPropertyState.m",
"src/Source/NSArray-CDExtensions.h",
"src/Source/NSArray-CDExtensions.m",
"src/Source/NSData-CDExtensions.h",
"src/Source/NSData-CDExtensions.m",
"src/Source/NSError-CDExtensions.h",
"src/Source/NSError-CDExtensions.m",
"src/Source/NSScanner-CDExtensions.h",
"src/Source/NSScanner-CDExtensions.m",
"src/Source/NSString-CDExtensions.h",
"src/Source/NSString-CDExtensions.m",
"src/Source/ULEB128.h",
"src/Source/ULEB128.m",
"src/Source/cd_objc2.h",
"src/class-dump.m",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
":config",
"//build/config/compiler:enable_arc",
"//build/config/compiler:no_chromium_code",
]
# TODO(crbug.com/595295): Building class-dump tools requires OS X SDK
# version 10.9 or higher. To prevent mixing code using different value
# of minimum SDK supported, forbids dependencies on any Chromium target.
assert_no_deps = [ "//base/*" ]
}
(Copied from the README.)
--------------------------------------------------------------------------------
This file is part of class-dump, a utility for examining the
Objective-C segment of Mach-O files.
Copyright (C) 1997-1998, 2000-2001, 2004-2013 Steve Nygard.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Contact
-------
You may contact the author by:
e-mail: nygard at gmail.com
\ No newline at end of file
justincohen@chromium.org
rohitrao@chromium.org
class-dump is a command-line utility for examining the Objective-C
segment of Mach-O files. It generates declarations for the classes,
categories and protocols. This is the same information provided by
using 'otool -ov', but presented as normal Objective-C declarations.
The latest version and information is available at:
<http://www.codethecode.com/projects/class-dump>
-----
This file is part of class-dump, a utility for examining the
Objective-C segment of Mach-O files.
Copyright (C) 1997-1998, 2000-2001, 2004-2010 Steve Nygard.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
You may contact the author by:
e-mail: class-dump at codethecode.com
Name: class-dump
URL: https://github.com/nygard/class-dump
Version: 3.5
License: NOT_SHIPPED
Revision: 978d177ca6f0d2e5e34acf3e8dadc63e3140ebbc
Security Critical: NO
Description:
Used to generate Objective C interfaces for things not otherwise documented.
Local Modifications:
None
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Given a framework, generates a header file declaring the classes from that
# framework using class-dump tool.
#
# Arguments:
#
# framework_name
# string, short name of the framework.
#
# framework_path
# string, location of the framework, usually a sub-directory of
# Xcode application bundle.
#
# framework_version
# (optional) string, version of the framework to dump class for,
# defaults to "Current" if omitted.
#
# class_dump_filter
# regexp, only display classes matching this regular expression.
#
# topological_sort
# (optional) boolean, sort classes, categories, and protocols by
# inheritance, defaults to false if omitted.
#
# All common target arugments ("visibility", "deps", ...) are forwarded by
# the template.
template("class_dump") {
assert(defined(invoker.framework_name),
"framework_name must be defined for $target_name")
assert(defined(invoker.framework_path),
"framework_path must be defined for $target_name")
assert(defined(invoker.class_dump_filter),
"class_dump_filter must be defined for $target_name")
framework_version = "Current"
if (defined(invoker.framework_version)) {
framework_version = invoker.framework_version
}
sort_args = []
if (defined(invoker.topological_sort) && invoker.topological_sort) {
sort_args = [ "-I" ]
}
class_dump = "//third_party/class-dump(${host_toolchain})"
class_dump_bin = get_label_info(class_dump, "root_out_dir") + "/class-dump"
framework = "${invoker.framework_path}/${invoker.framework_name}.framework"
_config_name = target_name + "_config"
config(_config_name) {
visibility = [ ":$target_name" ]
include_dirs = [ "$target_gen_dir" ]
}
action(target_name) {
forward_variables_from(invoker,
"*",
[
"args",
"class_dump_filter",
"framework_name",
"framework_path",
"framework_version",
"script",
"sources",
])
if (!defined(deps)) {
deps = []
}
deps += [ class_dump ]
public_configs = [ ":$_config_name" ]
script = "//third_party/class-dump/class-dump.py"
inputs = [
class_dump_bin,
]
sources = [
"${framework}/Versions/${framework_version}/${invoker.framework_name}",
]
outputs = [
"$target_gen_dir/${invoker.framework_name}.h",
]
args = [
"-t=" + rebase_path(class_dump_bin, root_build_dir),
"-o=" + rebase_path(outputs[0], root_build_dir),
"--",
"-C${invoker.class_dump_filter}",
"${framework}",
]
args += sort_args
}
}
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Wrapper around class-dump to allow gn build to run the tool (as action
# target can only run python scripts). Also filters the output to remove
# all cxx_destruct lines that are not understood from class-dump output.
import argparse
import errno
import os
import subprocess
import sys
def Main(args):
parser = argparse.ArgumentParser('wrapper around class-dump')
parser.add_argument(
'-o', '--output', required=True,
help='name of the output file')
parser.add_argument(
'-t', '--class-dump-path', required=True,
help='path to class-dump executable')
parser.add_argument(
'args', nargs='*',
help='arguments to pass to class-dump')
args = parser.parse_args(args)
try:
os.makedirs(os.path.dirname(args.output))
except OSError, e:
if e.errno != errno.EEXIST:
raise
process = subprocess.Popen(
[args.class_dump_path] + args.args,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
if process.returncode != 0:
sys.stderr.write(stderr)
sys.exit(process.returncode)
with open(args.output, 'wb') as output:
output.write("// Treat class-dump output as a system header.\n")
output.write("#pragma clang system_header\n")
for line in stdout.splitlines():
if 'cxx_destruct' in line:
continue
output.write(line)
output.write('\n')
if __name__ == '__main__':
Main(sys.argv[1:])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment