def _filter(vars): if OPTIONS.is_nacl_build(): # The flag is valid only for C/ObjC but not for C++ on NaCl gcc. vars.remove_c_or_cxxflag('-Wno-int-to-pointer-cast') # TODO(crbug.com/327496): Move this to generic functionality of # make_to_ninja. intermediates_dir = (make_to_ninja.MakefileNinjaTranslator. get_intermediate_headers_dir()) vars.get_includes().append(intermediates_dir) # TODO(crbug.com/414569): L-rebase: These include directories do not seem to # be being added. Fix that. vars.get_includes().append( 'android/frameworks/av/media/img_utils/include') vars.get_includes().append('android/external/skia/include/pathops') vars.get_includes().append( 'android/system/core/libprocessgroup/include') vars.get_implicit_deps().extend([ intermediates_dir + '/' + i for i in [ 'libsonivox/eas.h', 'libsonivox/eas_types.h', 'libsonivox/eas_reverb.h', 'libsonivox/jet.h' ] ]) # Exclude ZygoteInit for which we have stubbed out jni registrations. vars.get_sources().remove('android/frameworks/base/core/jni/' 'com_android_internal_os_ZygoteInit.cpp') # Exclude GLES31+ functionality since we do not currently support it. vars.get_sources().remove('android/frameworks/base/core/jni/' 'android_opengl_GLES31.cpp') vars.get_sources().remove('android/frameworks/base/core/jni/' 'android_opengl_GLES31Ext.cpp') # Add ARC specific JNIs. vars.get_sources().extend([ 'android/frameworks/base/core/jni/org_chromium_arc_internal_Tracing.cpp', # NOQA 'android/frameworks/base/core/jni/org_chromium_arc_ArcProxySelector.cpp', # NOQA ]) if OPTIONS.disable_hwui(): # Defining this enables support for hardware accelerated rendering in the # user interface code, such as when an application uses a TextureView. The # primary effect is to use libhwui. It is enabled by default in the # Android.mk file, we disable it here when not enabling hwui. vars.get_cflags().remove('-DUSE_OPENGL_RENDERER') if build_common.use_ndk_direct_execution(): vars.get_cflags().append('-DUSE_NDK_DIRECT_EXECUTION') deps = vars.get_shared_deps() excluded_libs = ( 'libprocessgroup', # Not built 'libhardware_legacy', # Not built 'libnetutils', # Not built 'libselinux', # Not built 'libusbhost', # Not built (only for MTP) 'libwpa_client') # Not built deps[:] = [x for x in deps if x not in excluded_libs] return True
def _filter(vars): if OPTIONS.is_nacl_build(): # The flag is valid only for C/ObjC but not for C++ on NaCl gcc. vars.remove_c_or_cxxflag('-Wno-int-to-pointer-cast') # TODO(crbug.com/327496): Move this to generic functionality of # make_to_ninja. intermediates_dir = ( make_to_ninja.MakefileNinjaTranslator.get_intermediate_headers_dir()) vars.get_includes().append(intermediates_dir) # TODO(crbug.com/414569): L-rebase: These include directories do not seem to # be being added. Fix that. vars.get_includes().append('android/frameworks/av/media/img_utils/include') vars.get_includes().append('android/external/skia/include/pathops') vars.get_includes().append('android/system/core/libprocessgroup/include') vars.get_implicit_deps().extend( [intermediates_dir + '/' + i for i in [ 'libsonivox/eas.h', 'libsonivox/eas_types.h', 'libsonivox/eas_reverb.h', 'libsonivox/jet.h']]) # Exclude ZygoteInit for which we have stubbed out jni registrations. vars.get_sources().remove('android/frameworks/base/core/jni/' 'com_android_internal_os_ZygoteInit.cpp') # Exclude GLES31+ functionality since we do not currently support it. vars.get_sources().remove('android/frameworks/base/core/jni/' 'android_opengl_GLES31.cpp') vars.get_sources().remove('android/frameworks/base/core/jni/' 'android_opengl_GLES31Ext.cpp') # Add ARC specific JNIs. vars.get_sources().extend([ 'android/frameworks/base/core/jni/org_chromium_arc_internal_Tracing.cpp', # NOQA 'android/frameworks/base/core/jni/org_chromium_arc_ArcProxySelector.cpp', # NOQA ]) if OPTIONS.disable_hwui(): # Defining this enables support for hardware accelerated rendering in the # user interface code, such as when an application uses a TextureView. The # primary effect is to use libhwui. It is enabled by default in the # Android.mk file, we disable it here when not enabling hwui. vars.get_cflags().remove('-DUSE_OPENGL_RENDERER') if build_common.use_ndk_direct_execution(): vars.get_cflags().append('-DUSE_NDK_DIRECT_EXECUTION') deps = vars.get_shared_deps() excluded_libs = ( 'libprocessgroup', # Not built 'libhardware_legacy', # Not built 'libnetutils', # Not built 'libselinux', # Not built 'libusbhost', # Not built (only for MTP) 'libwpa_client') # Not built deps[:] = [x for x in deps if x not in excluded_libs] return True
# Dummy network does not provide its own DNS server names. # The value matches the default from config.xml. print 'net.dns1=8.8.8.8' # Normally init parses the hardware value from the kernel command line # androidboot.hardware=* parameter. We hardcode it here and this is # used in determining appropriate HAL modules. print 'ro.hardware=arc' # Enable atrace. See android/frameworks/base/core/java/android/os/Trace.java # for flag definition. Here we turn on every category when debugging code is # enabled. if OPTIONS.is_debug_code_enabled(): print 'debug.atrace.tags.enableflags=' + str(int('0xffffffff', 16)) if not OPTIONS.disable_hwui(): # This value is exposed through the Activity Manager service # getDeviceConfigurationInfo() call, and this value indicates that GLES2 is # available. The number is the major version number in the upper sixteen bits # followed by the minor version number in the lower sixteen bits. print 'ro.opengles.version=131072' # Normally added upstream at android/build/core/main.mk. Services can restrict # functionality based on this value (currently very few do). Setting this # value allows CtsOsTestCases:android.os.cts.BuildTest to pass. secure = "0" if build_common.get_build_type() == "user": secure = "1" print 'ro.secure=' + secure # The following three properties synchronize dex2oat's arguments at build time