diff --git a/BUILD.gn b/BUILD.gn index d26fea704bf4797af7a7f86a567f5f9244d5d58a..dbf8be06ecf33f2ef8327a32a16ac7b016c2e83e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -35,6 +35,11 @@ if (defined(ohos_lite)) { "-D_GNU_SOURCE", "-D_POSIX_C_SOURCE=200112", ] + + # Adding NDEBUG macro manually to avoid compilation + # error in debug version, FIX ME + # https://gitee.com/openharmony/build/pulls/1206/files + defines += [ "NDEBUG" ] } # This is the configuration used to build libuv itself. @@ -46,6 +51,11 @@ if (defined(ohos_lite)) { "src", "src/unix", ] + + # Adding NDEBUG macro manually to avoid compilation + # error in debug version, FIX ME + # https://gitee.com/openharmony/build/pulls/1206/files + defines += [ "NDEBUG" ] } source_set("libuv_source") { @@ -168,6 +178,11 @@ if (defined(ohos_lite)) { "-D_GNU_SOURCE", "-D_POSIX_C_SOURCE=200112", ] + + # Adding NDEBUG macro manually to avoid compilation + # error in debug version, FIX ME + # https://gitee.com/openharmony/build/pulls/1206/files + defines = [ "NDEBUG" ] } else if (is_mingw || is_win) { cflags += [ "-Wno-missing-braces", @@ -183,6 +198,11 @@ if (defined(ohos_lite)) { "_WIN32_WINNT=0x0600", ] + # Adding NDEBUG macro manually to avoid compilation + # error in debug version, FIX ME + # https://gitee.com/openharmony/build/pulls/1206/files + defines += [ "NDEBUG" ] + libs = [ "psapi", "user32", @@ -203,6 +223,11 @@ if (defined(ohos_lite)) { "src", "src/unix", ] + + # Adding NDEBUG macro manually to avoid compilation + # error in debug version, FIX ME + # https://gitee.com/openharmony/build/pulls/1206/files + defines = [ "NDEBUG" ] } ohos_source_set("libuv_source") {