[macruby-changes] [4769] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Oct 8 15:21:16 PDT 2010
Revision: 4769
http://trac.macosforge.org/projects/ruby/changeset/4769
Author: lsansonetti at apple.com
Date: 2010-10-08 15:21:14 -0700 (Fri, 08 Oct 2010)
Log Message:
-----------
detect new BridgeSupport at build time
Modified Paths:
--------------
MacRuby/trunk/bridgesupport.cpp
MacRuby/trunk/rakelib/builder/options.rb
Modified: MacRuby/trunk/bridgesupport.cpp
===================================================================
--- MacRuby/trunk/bridgesupport.cpp 2010-10-08 22:02:44 UTC (rev 4768)
+++ MacRuby/trunk/bridgesupport.cpp 2010-10-08 22:21:14 UTC (rev 4769)
@@ -1114,7 +1114,7 @@
: bs_informal_protocol_imethods;
char *type;
-#if __LP64__ && MAC_OS_X_VERSION_MAX_ALLOWED < 1070
+#if !defined(BS_TOT) && __LP64__
// XXX workaround <rdar://problem/7318177> 64-bit informal protocol annotations are missing
// Manually converting some 32-bit types to 64-bit...
const size_t typelen = strlen(bs_inf_prot_method->type) + 1;
@@ -1221,7 +1221,7 @@
if (!ok) {
rb_raise(rb_eRuntimeError, "%s", error);
}
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
+#if !defined(BS_TOT)
# if defined(__LP64__)
static bool R6399046_fixed = false;
// XXX work around for
@@ -1238,29 +1238,7 @@
}
# endif
#endif
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- static bool R6401816_fixed = false;
- // XXX work around for
- // <rdar://problem/6401816> -[NSObject performSelector:withObject:] has wrong sel_of_type attributes
- if (!R6401816_fixed) {
- bs_element_method_t *bs_method = GET_CORE()->find_bs_method((Class)rb_cNSObject,
- sel_registerName("performSelector:withObject:"));
- if (bs_method != NULL) {
- bs_element_arg_t *arg = bs_method->args;
- while (arg != NULL) {
- if (arg->index == 0
- && arg->sel_of_type != NULL
- && arg->sel_of_type[0] != '@') {
- arg->sel_of_type[0] = '@';
- R6401816_fixed = true;
- break;
- }
- arg++;
- }
- }
- }
-#endif
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
+#if !defined(BS_TOT)
static bool R7281806fixed = false;
// XXX work around for
// <rdar://problem/7281806> -[NSObject performSelector:] has wrong sel_of_type attributes
Modified: MacRuby/trunk/rakelib/builder/options.rb
===================================================================
--- MacRuby/trunk/rakelib/builder/options.rb 2010-10-08 22:02:44 UTC (rev 4768)
+++ MacRuby/trunk/rakelib/builder/options.rb 2010-10-08 22:21:14 UTC (rev 4769)
@@ -35,6 +35,8 @@
ENV['LLVM_TOT'] = '1'
end
+BS_TOT = File.exist?('/System/Library/BridgeSupport/ruby-1.8/bridgesupportparser.bundle')
+
RUBY_INSTALL_NAME = b.option('ruby_install_name', 'macruby')
RUBY_SO_NAME = b.option('ruby_so_name', RUBY_INSTALL_NAME)
LLVM_PATH = b.option('llvm_path', llvm_default_path)
@@ -169,6 +171,10 @@
@cflags << ' -DNO_LIBAUTO'
@cxxflags << ' -DNO_LIBAUTO'
end
+ if BS_TOT
+ @cflags << ' -DBS_TOT'
+ @cxxflags << ' -DBS_TOT'
+ end
@cxxflags << " -fno-rtti" unless @cxxflags.index("-fno-rtti")
@dldflags = "-dynamiclib -undefined suppress -flat_namespace -install_name #{INSTALL_NAME} -current_version #{MACRUBY_VERSION} -compatibility_version #{MACRUBY_VERSION} -exported_symbols_list #{EXPORTED_SYMBOLS_LIST}"
if `sw_vers -productVersion`.to_f <= 10.6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101008/b2d9e5fd/attachment-0001.html>
More information about the macruby-changes
mailing list