We were setting the base options for the Objective-C compiler manually, due to which options such as b_bitcode and b_ndebug were not getting set at all. The base options here are the same as for C code with the Clang compiler, so just use the same inherited list. Also expand the bitcode test to ObjC and ObjC++ so this doesn't happen again.pull/5543/head
parent
80856884cc
commit
9042130e9a
8 changed files with 45 additions and 9 deletions
@ -0,0 +1,7 @@ |
|||||||
|
#import <stdio.h> |
||||||
|
#import "vis.h" |
||||||
|
|
||||||
|
int EXPORT_PUBLIC libbar(int arg) { |
||||||
|
return 0; |
||||||
|
} |
||||||
|
|
@ -0,0 +1,5 @@ |
|||||||
|
#include "vis.h" |
||||||
|
|
||||||
|
int EXPORT_PUBLIC libfunc() { |
||||||
|
return 3; |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
#import <stdio.h> |
||||||
|
#import "vis.h" |
||||||
|
|
||||||
|
int EXPORT_PUBLIC libfoo(int arg) { |
||||||
|
return 0; |
||||||
|
} |
||||||
|
|
@ -0,0 +1,10 @@ |
|||||||
|
project('bitcode test', 'c', 'objc', 'objcpp') |
||||||
|
|
||||||
|
both_libraries('alib', 'libfoo.m') |
||||||
|
shared_module('amodule', 'libfoo.m') |
||||||
|
|
||||||
|
both_libraries('blib', 'libbar.mm') |
||||||
|
shared_module('bmodule', 'libbar.mm') |
||||||
|
|
||||||
|
both_libraries('clib', 'libfile.c') |
||||||
|
shared_module('cmodule', 'libfile.c') |
@ -0,0 +1,6 @@ |
|||||||
|
#if defined __GNUC__ |
||||||
|
#define EXPORT_PUBLIC __attribute__ ((visibility("default"))) |
||||||
|
#else |
||||||
|
#pragma message ("Compiler does not support symbol visibility.") |
||||||
|
#define EXPORT_PUBLIC |
||||||
|
#endif |
Loading…
Reference in new issue