Skip to content

Compiler flags for integration testing and allscalecc are broken #4

@sithhell

Description

@sithhell

I want to make the compiler flags for integration testing and running allscalecc directly consistent.

So far, the places I found where the flags are configured in code/allscale_integration_test_config.in and code/compiler/src/backend/allscale_backend.cpp.
I am not sure where and when the compile flags are set. and at which places they need to change.

Essentially, what I am trying to accomplish is the following:

diff --git a/code/compiler/src/backend/allscale_backend.cpp b/code/compiler/src/backend/allscale_backend.cpp
index bfc80db..5eeda24 100644
--- a/code/compiler/src/backend/allscale_backend.cpp
+++ b/code/compiler/src/backend/allscale_backend.cpp
@@ -105,9 +105,19 @@ namespace backend {
                compiler.addFlag("-Wl,--no-as-needed");
 
                // add libraries
-               compiler.addExternalLibrary(ALLSCALE_RUNTIME_LIBRARY_DIR, "allscale");
+               compiler.addExternalLibrary(ALLSCALE_RUNTIME_LIBRARY_DIR, "hpx_allscale");
+#if defined(ALLSCALE_RUNTIME_DEBUG)
+               compiler.addFlag("-D_DEBUG");
+               compiler.addFlag("-DDEBUG");
+               compiler.addExternalLibrary(HPX_LIBRARY_DIR, "hpx_initd");
+               compiler.addExternalLibrary(HPX_LIBRARY_DIR, "hpxd");
+#else
+               compiler.addFlag("-DNDEBUG");
+               compiler.addFlag("-DHPX_DISABLE_ASSERTS");
+               compiler.addFlag("-DBOOST_DISABLE_ASSERTS");
                compiler.addExternalLibrary(HPX_LIBRARY_DIR, "hpx_init");
                compiler.addExternalLibrary(HPX_LIBRARY_DIR, "hpx");
+#endif
                compiler.addExternalLibrary(BOOST_LIBRARY_DIR, "boost_chrono");
                compiler.addExternalLibrary(BOOST_LIBRARY_DIR, "boost_date_time");
                compiler.addExternalLibrary(BOOST_LIBRARY_DIR, "boost_filesystem");

with ALLSCALE_RUNTIME_DEBUG being set when the CMAKE_BUILD_TYPE is Debug.

Any hints or suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions