This repository was archived by the owner on Nov 6, 2022. It is now read-only.
File tree 5 files changed +21
-4
lines changed
5 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,11 @@ if (RUST_SGX)
56
56
# on older platforms.
57
57
#
58
58
# See https://github.com/rust-lang/rust/issues/34978
59
- list (APPEND LIBUNWIND_COMPILE_FLAGS -Wa,-mrelax-relocations=no )
59
+ if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
60
+ list (APPEND LIBUNWIND_COMPILE_FLAGS -Wa,-mrelax-relocations=no )
61
+ else ()
62
+ list (APPEND LIBUNWIND_COMPILE_FLAGS)
63
+ endif ()
60
64
61
65
# Sources
62
66
list (APPEND LIBUNWIND_C_SOURCES UnwindRustSgx.c)
@@ -119,9 +123,9 @@ string(REPLACE ";" " " LIBUNWIND_C_FLAGS "${LIBUNWIND_C_FLAGS}")
119
123
string (REPLACE ";" " " LIBUNWIND_LINK_FLAGS "${LIBUNWIND_LINK_FLAGS} " )
120
124
121
125
set_property (SOURCE ${LIBUNWIND_CXX_SOURCES}
122
- APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_CXX_FLAGS} ${ LIBUNWIND_CXX_FLAGS} " )
126
+ APPEND_STRING PROPERTY COMPILE_FLAGS " ${LIBUNWIND_CXX_FLAGS} " )
123
127
set_property (SOURCE ${LIBUNWIND_C_SOURCES}
124
- APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_C_FLAGS} ${ LIBUNWIND_C_FLAGS} " )
128
+ APPEND_STRING PROPERTY COMPILE_FLAGS " ${LIBUNWIND_C_FLAGS} " )
125
129
126
130
# Add a object library that contains the compiled source files.
127
131
add_library (unwind_objects OBJECT ${LIBUNWIND_SOURCES} ${LIBUNWIND_HEADERS} )
Original file line number Diff line number Diff line change 19
19
// to export these functions from libunwind.so as well.
20
20
#define _LIBUNWIND_UNWIND_LEVEL1_EXTERNAL_LINKAGE 1
21
21
22
+ #ifndef __clang__
22
23
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
24
+ #endif
25
+
23
26
#pragma GCC diagnostic ignored "-Wempty-body"
24
27
25
28
#include <inttypes.h>
Original file line number Diff line number Diff line change 17
17
#include <stddef.h>
18
18
#include "UnwindRustSgx.h"
19
19
20
+ #pragma GCC diagnostic ignored "-Wunused-parameter"
20
21
21
22
#define max_log 256
22
23
Original file line number Diff line number Diff line change 5
5
* on all source code distributions
6
6
*/
7
7
8
- #pragma GCC diagnostic ignored "-Wconversion"
8
+ #ifndef __clang__
9
9
#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
10
+ #else
11
+ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
12
+ #endif
13
+
14
+ #pragma GCC diagnostic ignored "-Wconversion"
10
15
#pragma GCC diagnostic ignored "-Wfloat-conversion"
11
16
#pragma GCC diagnostic ignored "-Wsign-conversion"
12
17
#pragma GCC diagnostic ignored "-Wstrict-overflow"
Original file line number Diff line number Diff line change 10
10
//
11
11
// ===----------------------------------------------------------------------===//
12
12
13
+ #ifndef __clang__
13
14
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
15
+ #endif
16
+
17
+ #pragma GCC diagnostic ignored "-Wunused-parameter"
14
18
#pragma GCC diagnostic ignored "-Wmissing-braces"
15
19
#pragma GCC diagnostic ignored "-Wsign-conversion"
16
20
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
You can’t perform that action at this time.
0 commit comments