From 026dea6d5bc9baa41c0c7e857733c90190b6c538 Mon Sep 17 00:00:00 2001 From: zizon Date: Mon, 16 May 2016 11:12:25 +0800 Subject: [PATCH] Fix: enable exception handling. since this addon contains no throw statement,compiler(MacOS/llvm) will not trigger generation of RTTI which needed for type match in try-catch clause. Reference: https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW10 --- binding.gyp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/binding.gyp b/binding.gyp index e2752e7..9b75bf0 100644 --- a/binding.gyp +++ b/binding.gyp @@ -22,8 +22,8 @@ { "target_name": "imagemagick", "sources": [ "src/imagemagick.cc" ], - 'cflags!': [ '-fno-exceptions' ], - 'cflags_cc!': [ '-fno-exceptions' ], + 'cflags!': [ '-fno-exceptions','-fno-rtti' ], + 'cflags_cc!': [ '-fno-exceptions','-fno-rtti' ], "include_dirs" : [ "