Reviewers: danno, Michael Achenbach, Sven Panne, Jakob, paul.l...,
dusmil.imgtec, akos.palfi.imgtec,
Message:
We would like to use Xcode/mac for development. V8-team reviewers, please
take a
look. These changes have got lgtm in
https://codereview.chromium.org/1133163005/#ps160001
but were reverted because of a mac bot failure (with gdbjit support). Now
all
the mac (and other) trybots got green.
Description:
Add -Wshorten-64-to-32 flag to mac builds.
BUG=
Please review this at https://codereview.chromium.org/1237753004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+10, -3 lines):
M build/standalone.gypi
M src/base/platform/time.cc
M src/gdb-jit.cc
Index: build/standalone.gypi
diff --git a/build/standalone.gypi b/build/standalone.gypi
index
788b96e01b7e06ef54547daeac4d79770c68c7d1..2fba9a9c2a4856f30ddda94786e49c1c5bd66491
100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -787,6 +787,12 @@
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', # -std=gnu++0x
},
+ 'conditions': [
+ ['v8_target_arch=="x64" or v8_target_arch=="arm64" \
+ or v8_target_arch=="mips64el"', {
+ 'xcode_settings': {'WARNING_CFLAGS':
['-Wshorten-64-to-32']},
+ }],
+ ]
}],
],
'target_conditions': [
Index: src/base/platform/time.cc
diff --git a/src/base/platform/time.cc b/src/base/platform/time.cc
index
b6a11cff34f313661536eb0d20b43cf7d598e479..7e4c8fc0ac902db962fa3b5a3337f1e876ebd561
100644
--- a/src/base/platform/time.cc
+++ b/src/base/platform/time.cc
@@ -111,7 +111,7 @@ TimeDelta TimeDelta::FromMachTimespec(struct
mach_timespec ts) {
struct mach_timespec TimeDelta::ToMachTimespec() const {
struct mach_timespec ts;
DCHECK(delta_ >= 0);
- ts.tv_sec = delta_ / Time::kMicrosecondsPerSecond;
+ ts.tv_sec = static_cast<unsigned>(delta_ / Time::kMicrosecondsPerSecond);
ts.tv_nsec = (delta_ % Time::kMicrosecondsPerSecond) *
Time::kNanosecondsPerMicrosecond;
return ts;
Index: src/gdb-jit.cc
diff --git a/src/gdb-jit.cc b/src/gdb-jit.cc
index
2746806e925fe3d1acd65daf97092a4513be9846..2df282224050df3ddf0cdeacc0914da637080f0c
100644
--- a/src/gdb-jit.cc
+++ b/src/gdb-jit.cc
@@ -355,7 +355,7 @@ class ELFSection : public
DebugSectionBase<ELFSectionHeader> {
#if defined(__MACH_O)
class MachOTextSection : public MachOSection {
public:
- MachOTextSection(uintptr_t align,
+ MachOTextSection(uint32_t align,
uintptr_t addr,
uintptr_t size)
: MachOSection("__text",
@@ -588,7 +588,8 @@ class MachO BASE_EMBEDDED {
Writer::Slot<MachOSection::Header> headers =
w->CreateSlotsHere<MachOSection::Header>(sections_.length());
cmd->fileoff = w->position();
- header->sizeofcmds = w->position() - load_command_start;
+ header->sizeofcmds = static_cast<uint32_t>(w->position() -
+ load_command_start);
for (int section = 0; section < sections_.length(); ++section) {
sections_[section]->PopulateHeader(headers.at(section));
sections_[section]->WriteBody(headers.at(section), w);
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.