diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0e00cae..124f970 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -25,6 +25,8 @@ source: build: number: {{ build_number }} string: clang{{ (clangdev or "None").split(".")[0] }}_repl_h{{ PKG_HASH }}_{{ build_number }} + ignore_run_exports: + - zstd # [win] requirements: build: @@ -46,7 +48,7 @@ requirements: - backtrace # [unix and x86] - libxml2 - zlib - - zstd # [not win] + - zstd # [unix] - libcxx {{ cxx_compiler_version }} # [osx] - libstdcxx-ng {{ cxx_compiler_version }} # [linux] run_constrained: @@ -73,17 +75,18 @@ test: # Avoid Bad CPU from cmake when cross-compiling on osx and arm... - exit 0 # [build_platform != target_platform] - mkdir -p cmake_build_test && pushd cmake_build_test + - {{ cxx_compiler }} -xc++ -E -v /dev/null # [unix] - cmake -DCMAKE_BUILD_TYPE=Debug -DCONDA_PREFIX="$BUILD_PREFIX" -G "Ninja" .. - cmake --build . --config Debug -- -v - - ./cmake_build_test || true #FIXME + - ./cmake_build_test {{ cxx_compiler }} # [unix] - rm -fr * - cmake -DCMAKE_BUILD_TYPE=Release -DCONDA_PREFIX="$BUILD_PREFIX" -G "Ninja" .. - cmake --build . --config Release - - ./cmake_build_test || true #FIXME + - ./cmake_build_test {{ cxx_compiler }} # [unix] - rm -fr * - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONDA_PREFIX="$BUILD_PREFIX" -G "Ninja" .. - cmake --build . --config RelWithDebInfo - - ./cmake_build_test || true #FIXME + - ./cmake_build_test {{ cxx_compiler }} # [unix] - popd about: diff --git a/recipe/patches/cppinterop/0006-Add-DllExports.patch b/recipe/patches/cppinterop/0006-Add-DllExports.patch index 8936438..cc3e244 100644 --- a/recipe/patches/cppinterop/0006-Add-DllExports.patch +++ b/recipe/patches/cppinterop/0006-Add-DllExports.patch @@ -213,7 +213,7 @@ index 96345ffb..004cf5bf 100644 /// can be used to iterate through the index value to get each specific /// base class. - TCppScope_t GetBaseClass(TCppType_t klass, TCppIndex_t ibase); -+ DllExport DllExport TCppScope_t GetBaseClass(TCppType_t klass, TCppIndex_t ibase); ++ DllExport TCppScope_t GetBaseClass(TCppType_t klass, TCppIndex_t ibase); /// Checks if the supplied Derived Class is a sub-class of the /// provided Base Class. diff --git a/recipe/test.cpp b/recipe/test.cpp index 3db56da..178bb42 100644 --- a/recipe/test.cpp +++ b/recipe/test.cpp @@ -21,7 +21,7 @@ inline std::string append_path(const std::string &to, const std::string& what) { using Args = std::vector; -void* createInterpreter(const Args &ExtraArgs = {}) { +void* createInterpreter(const char* CxxCompiler, const Args &ExtraArgs = {}) { Args ClangArgs; if (std::find(ExtraArgs.begin(), ExtraArgs.end(), "-resource-dir") != ExtraArgs.end()) { std::string resource_dir = Cpp::DetectResourceDir(); @@ -31,12 +31,11 @@ void* createInterpreter(const Args &ExtraArgs = {}) { ClangArgs.push_back(resource_dir); } std::vector CxxSystemIncludes; - const char* DefaultCxxName = "x86_64-conda-linux-gnu-c++"; // Oddly, conda supports "pseudo cross-compilation" and gives us the compiler // include paths relative to the compiler binary. Now we need to find out // where that binary is... const char* Prefix = CONDA_PREFIX; - Cpp::DetectSystemCompilerIncludePaths(CxxSystemIncludes, DefaultCxxName); + Cpp::DetectSystemCompilerIncludePaths(CxxSystemIncludes, CxxCompiler); for (std::string CxxInclude : CxxSystemIncludes) { if (!file_exists(CxxInclude)) { // Try make these paths absolute. @@ -59,18 +58,14 @@ void* createInterpreter(const Args &ExtraArgs = {}) { std::transform(ClangArgs.begin(), ClangArgs.end(), Args.begin(), [](const std::string &s) -> const char * { return s.data(); }); - for (const char* arg : Args) - std::cout << arg << "\n"; - - std::cout << "----------------\n"; - - for (auto arg : ClangArgs) - std::cout << arg << "\n"; - return Cpp::CreateInterpreter(Args/*, {"-cuda"}*/); } -int main() { - createInterpreter({"-v"}); +int main(int argc, char *argv[]) { + if (argc < 2) + std::cerr << "Not enough arguments. Pass a compiler name.\n"; + + createInterpreter(argv[1], {"-v"}); + return Cpp::Process("#include "); }