Commit 0611d82f authored by Kevin Modzelewski's avatar Kevin Modzelewski Committed by GitHub

Merge pull request #1345 from kmod/implicit_function_declaration

Turn off implicit-function check in release mode
parents 92fc9c30 9e1ed8ab
......@@ -373,7 +373,9 @@ class CCompiler:
cc_args[:0] = before
if not any ('scipy' in s for s in pp_opts):
cc_args = cc_args + ["-Werror=implicit-function-declaration"]
import sysconfig
if '-DNDEBUG' not in sysconfig.get_config_var('CFLAGS'):
cc_args = cc_args + ["-Werror=implicit-function-declaration"]
return cc_args
def _fix_compile_args(self, output_dir, macros, include_dirs):
......
......@@ -138,23 +138,16 @@ extern "C" Box* import(int level, Box* from_imports, llvm::StringRef module_name
BoxedModule* importCExtension(BoxedString* full_name, const std::string& last_name, const std::string& path) {
void* handle = dlopen(path.c_str(), RTLD_NOW);
if (!handle) {
const char* s = dlerror();
// raiseExcHelper(ImportError, "%s", dlerror());
fprintf(stderr, "%s\n", s);
exit(1);
}
if (!handle)
raiseExcHelper(ImportError, "%s", dlerror());
assert(handle);
std::string initname = "init" + last_name;
void (*init)() = (void (*)())dlsym(handle, initname.c_str());
char* error;
if ((error = dlerror()) != NULL) {
// raiseExcHelper(ImportError, "%s", error);
fprintf(stderr, "%s\n", error);
exit(1);
}
if ((error = dlerror()) != NULL)
raiseExcHelper(ImportError, "%s", error);
assert(init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment