Strcmp thinko and SConstruct improvement for d8 on Android.
Review URL: http://codereview.chromium.org/42560 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
f38dc917b0
commit
62a7f913a2
27
SConstruct
27
SConstruct
@ -70,6 +70,17 @@ ANDROID_INCLUDES = [ANDROID_TOP + '/bionic/libc/arch-arm/include',
|
||||
ANDROID_TOP + '/bionic/libm/include/arch/arm',
|
||||
ANDROID_TOP + '/bionic/libthread_db/include']
|
||||
|
||||
ANDROID_LINKFLAGS = ['-nostdlib',
|
||||
'-Bdynamic',
|
||||
'-Wl,-T,' + ANDROID_TOP + '/build/core/armelf.x',
|
||||
'-Wl,-dynamic-linker,/system/bin/linker',
|
||||
'-Wl,--gc-sections',
|
||||
'-Wl,-z,nocopyreloc',
|
||||
'-Wl,-rpath-link=' + ANDROID_TOP + '/out/target/product/generic/obj/lib',
|
||||
ANDROID_TOP + '/out/target/product/generic/obj/lib/crtbegin_dynamic.o',
|
||||
ANDROID_TOP + '/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/lib/gcc/arm-eabi/4.2.1/interwork/libgcc.a',
|
||||
ANDROID_TOP + '/out/target/product/generic/obj/lib/crtend_android.o'];
|
||||
|
||||
LIBRARY_FLAGS = {
|
||||
'all': {
|
||||
'CPPDEFINES': ['ENABLE_LOGGING_AND_PROFILING']
|
||||
@ -306,16 +317,7 @@ SAMPLE_FLAGS = {
|
||||
'CCFLAGS': ANDROID_FLAGS,
|
||||
'CPPPATH': ANDROID_INCLUDES,
|
||||
'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib'],
|
||||
'LINKFLAGS': ['-nostdlib',
|
||||
'-Bdynamic',
|
||||
'-Wl,-T,' + ANDROID_TOP + '/build/core/armelf.x',
|
||||
'-Wl,-dynamic-linker,/system/bin/linker',
|
||||
'-Wl,--gc-sections',
|
||||
'-Wl,-z,nocopyreloc',
|
||||
'-Wl,-rpath-link=' + ANDROID_TOP + '/out/target/product/generic/obj/lib',
|
||||
ANDROID_TOP + '/out/target/product/generic/obj/lib/crtbegin_dynamic.o',
|
||||
ANDROID_TOP + '/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/lib/gcc/arm-eabi/4.2.1/interwork/libgcc.a',
|
||||
ANDROID_TOP + '/out/target/product/generic/obj/lib/crtend_android.o'],
|
||||
'LINKFLAGS': ANDROID_LINKFLAGS,
|
||||
'LIBS': ['c', 'stdc++', 'm'],
|
||||
'mode:release': {
|
||||
'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
|
||||
@ -386,6 +388,11 @@ D8_FLAGS = {
|
||||
'os:freebsd': {
|
||||
'LIBS': ['pthread'],
|
||||
},
|
||||
'os:android': {
|
||||
'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib'],
|
||||
'LINKFLAGS': ANDROID_LINKFLAGS,
|
||||
'LIBS': ['c', 'stdc++', 'm'],
|
||||
},
|
||||
'os:win32': {
|
||||
'LIBS': ['winmm', 'ws2_32'],
|
||||
},
|
||||
|
@ -97,7 +97,7 @@ Persistent<Context> Shell::evaluation_context_;
|
||||
bool CounterMap::Match(void* key1, void* key2) {
|
||||
const char* name1 = reinterpret_cast<const char*>(key1);
|
||||
const char* name2 = reinterpret_cast<const char*>(key2);
|
||||
return strcmp(name1, name2) != 0;
|
||||
return strcmp(name1, name2) == 0;
|
||||
}
|
||||
|
||||
|
||||
|
3
src/d8.h
3
src/d8.h
@ -89,7 +89,8 @@ class CounterMap {
|
||||
}
|
||||
class Iterator {
|
||||
public:
|
||||
Iterator(CounterMap* map): map_(&map->hash_map_), entry_(map_->Start()) { }
|
||||
explicit Iterator(CounterMap* map)
|
||||
: map_(&map->hash_map_), entry_(map_->Start()) { }
|
||||
void Next() { entry_ = map_->Next(entry_); }
|
||||
bool More() { return entry_ != NULL; }
|
||||
const char* CurrentKey() { return static_cast<const char*>(entry_->key); }
|
||||
|
Loading…
Reference in New Issue
Block a user