Merge lp:~raof/mir/fix-and-enable-lto into lp:mir
- fix-and-enable-lto
- Merge into development-branch
Status: | Merged |
---|---|
Approved by: | Alan Griffiths |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3353 |
Proposed branch: | lp:~raof/mir/fix-and-enable-lto |
Merge into: | lp:mir |
Diff against target: |
593 lines (+144/-59) 30 files modified
CMakeLists.txt (+7/-0) benchmarks/frame-uniformity/CMakeLists.txt (+6/-0) cmake/FindGtestGmock.cmake (+1/-1) cmake/MirCommon.cmake (+42/-9) debian/rules (+7/-1) examples/CMakeLists.txt (+0/-2) examples/animated_cursor_demo_client.c (+0/-2) src/client/buffer_stream.cpp (+1/-1) src/client/buffer_stream.h (+1/-1) src/client/client_buffer_stream.h (+25/-2) src/client/lttng/CMakeLists.txt (+5/-0) src/client/screencast_stream.cpp (+1/-1) src/client/screencast_stream.h (+1/-1) src/common/sharedlibrary/module_deleter.cpp (+0/-3) src/common/thread/thread_name.cpp (+0/-3) src/include/client/mir/client_platform.h (+3/-1) src/platforms/android/client/android_client_platform.cpp (+3/-6) src/platforms/android/client/android_client_platform.h (+1/-1) src/platforms/common/client/mir/aging_buffer.h (+3/-3) src/platforms/mesa/client/client_platform.cpp (+3/-6) src/platforms/mesa/client/client_platform.h (+1/-1) src/server/report/lttng/CMakeLists.txt (+5/-0) tests/acceptance-tests/throwback/test_client_library_errors.cpp (+1/-1) tests/include/mir_test_framework/client_platform_factory.h (+20/-2) tests/include/mir_test_framework/stub_client_platform_factory.h (+1/-1) tests/mir_test/current_thread_name.cpp (+0/-3) tests/mir_test_framework/stub_client_platform_factory.cpp (+2/-3) tests/unit-tests/client/test_client_buffer_stream.cpp (+2/-2) tests/unit-tests/client/test_client_platform.cpp (+1/-1) tests/unit-tests/client/test_mir_connection.cpp (+1/-1) |
To merge this branch: | bzr merge lp:~raof/mir/fix-and-enable-lto |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Approve | |
Alan Griffiths | Approve | ||
Cemil Azizoglu (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Andreas Pokorny (community) | Approve | ||
Review via email: mp+282133@code.launchpad.net |
This proposal supersedes a proposal from 2015-12-22.
Commit message
Fix LTO build, and enable it for Debian packages.
Description of the change
Fix LTO build, and enable it for Debian packages.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
Chris Halse Rogers (raof) wrote : Posted in a previous version of this proposal | # |
/usr/include/
struct stat
^
/usr/include/
struct stat
^
/usr/include/
__ino_t st_ino; /* File serial number. */
^
/usr/include/
__ino_t __st_ino; /* 32bit file serial number. */
Interesting... this seems to be a genuine error; we've included stat.h with twice, with different compile options, really giving us two different definitions of struct stat.
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal | # |
hmm will gcc-nm and gcc-ar work for cross compilation?
Chris Halse Rogers (raof) wrote : Posted in a previous version of this proposal | # |
That's a fair question. Looks like it works, which somewhat surprised me :).
Of course, this also means that a cross-compile doesn't hit the issue that hit mediumtests-
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal | # |
ah the job of nm and ar is more elf-ish, tar-ish and less-ish so they might not need to interfere with the actual target format
Alan Griffiths (alan-griffiths) wrote : Posted in a previous version of this proposal | # |
Not sure why LP has this a "Merged" - it clearly isn't.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:3236
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:3236
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:3236
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:3236
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3238
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3238
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Andreas Pokorny (andreas-pokorny) wrote : | # |
https:/
[1452488342.218071] mirserver: Selected driver: android (version 0.19.0)
ERROR: Dynamic exception type: St12system_error
std::exception:
Do we need to clutter cmake with more pthread flags?
Apart from that. I can live with that fancy solution.
Alan Griffiths (alan-griffiths) wrote : | # |
Apart from the android failure looks good.
Should we also force use of gold with LTO?
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3238
http://
Executed test runs:
FAILURE: http://
None: http://
None: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Andreas Pokorny (andreas-pokorny) wrote : | # |
There is now a conflict, when resolved there is a chance that the problem on vivid/armhf is gone.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3238
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3332
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3340
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3340
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3341
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Alan Griffiths (alan-griffiths) wrote : | # |
+static_assert(
+ std::is_
+ sizeof(
+ "Oh, oh. EGLNativeWindowType isn't losslessly convertible to void*.\n"
+ "The ClientBufferStream requires that EGLNativeWindowType be convertible to void*");
It seems odd that this is needed for the LTO MP and that it is needed in two headers (out of the five that #include <EGL/eglplatfor
What's the reasoning for this approach and should we have a single wrapper header for all uses?
Chris Halse Rogers (raof) wrote : | # |
Moved the static_assert() check to a more relevant header, and gave it a more explicit comment.
It's here because the LTO turned out to allow a check which found that we were returning different types from different virtual overrides, because EGLNativeWindowType is a different type on different EGL platforms.
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3348
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Chris Halse Rogers (raof) wrote : | # |
Ah, there it is.
Different layouts for BufferStream because EGLNativeWindowType differs...
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3349
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Chris Halse Rogers (raof) wrote : | # |
I'm going to disable LTO on the clang build; it's too difficult to debug with clang being all not working in recent releases.
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3349
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Alan Griffiths (alan-griffiths) wrote : | # |
+ -DMIR_LINK_
While this is probably right, we ought to be explicit about which builds we want this optimization for (as it can slow things quite a bit).
I'd suggest not for the "normal" CI and developer builds where fast turnaround is desirable.
I think problems will be rare enough that enabling for autolanding would be fine as a final check. And for release.
Is that what happens?
(It also suggests the question of any compile-time optimizations we might want to enable.)
Cemil Azizoglu (cemil-azizoglu) wrote : | # |
> I think problems will be rare enough that enabling for autolanding would be
> fine as a final check. And for release.
+1
Chris Halse Rogers (raof) wrote : | # |
Ok. I've gated MIR_LINK_
I've also started to hook this up to CI, so that we pass DEB_BUILD_
Sadly CI is currently broken, having run out of disc space, and I don't think I have the ability to fix it without a shell on that machine.
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3350
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3350
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Mir CI Bot (mir-ci-bot) : | # |
Preview Diff
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2016-02-25 17:58:32 +0000 | |||
3 | +++ CMakeLists.txt 2016-02-28 23:45:57 +0000 | |||
4 | @@ -34,6 +34,8 @@ | |||
5 | 34 | add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) | 34 | add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) |
6 | 35 | add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR}) | 35 | add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR}) |
7 | 36 | add_definitions(-DMIR_VERSION_MICRO=${MIR_VERSION_PATCH}) | 36 | add_definitions(-DMIR_VERSION_MICRO=${MIR_VERSION_PATCH}) |
8 | 37 | add_definitions(-D_GNU_SOURCE) | ||
9 | 38 | add_definitions(-D_FILE_OFFSET_BITS=64) | ||
10 | 37 | 39 | ||
11 | 38 | set(MIR_VERSION ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}.${MIR_VERSION_PATCH}) | 40 | set(MIR_VERSION ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}.${MIR_VERSION_PATCH}) |
12 | 39 | 41 | ||
13 | @@ -81,6 +83,11 @@ | |||
14 | 81 | if(MIR_LINK_TIME_OPTIMIZATION) | 83 | if(MIR_LINK_TIME_OPTIMIZATION) |
15 | 82 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto") | 84 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto") |
16 | 83 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto") | 85 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto") |
17 | 86 | if(${CMAKE_COMPILER_IS_GNUCXX}) | ||
18 | 87 | set(CMAKE_NM "gcc-nm") | ||
19 | 88 | set(CMAKE_AR "gcc-ar") | ||
20 | 89 | set(CMAKE_RANLIB "gcc-ranlib") | ||
21 | 90 | endif() | ||
22 | 84 | endif() | 91 | endif() |
23 | 85 | 92 | ||
24 | 86 | string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower) | 93 | string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower) |
25 | 87 | 94 | ||
26 | === modified file 'benchmarks/frame-uniformity/CMakeLists.txt' | |||
27 | --- benchmarks/frame-uniformity/CMakeLists.txt 2016-01-29 08:18:22 +0000 | |||
28 | +++ benchmarks/frame-uniformity/CMakeLists.txt 2016-02-28 23:45:57 +0000 | |||
29 | @@ -15,6 +15,12 @@ | |||
30 | 15 | ${PROJECT_SOURCE_DIR}/tests/include/ | 15 | ${PROJECT_SOURCE_DIR}/tests/include/ |
31 | 16 | ) | 16 | ) |
32 | 17 | 17 | ||
33 | 18 | # We use mir-test-{doubles,framework}, which builds differently based on | ||
34 | 19 | # the primary test platform. | ||
35 | 20 | if (MIR_TEST_PLATFORM STREQUAL "android") | ||
36 | 21 | add_definitions(-DANDROID) | ||
37 | 22 | endif() | ||
38 | 23 | |||
39 | 18 | mir_add_wrapped_executable(frame_uniformity_test_client NOINSTALL | 24 | mir_add_wrapped_executable(frame_uniformity_test_client NOINSTALL |
40 | 19 | touch_measuring_client.cpp | 25 | touch_measuring_client.cpp |
41 | 20 | touch_producing_server.cpp | 26 | touch_producing_server.cpp |
42 | 21 | 27 | ||
43 | === modified file 'cmake/FindGtestGmock.cmake' | |||
44 | --- cmake/FindGtestGmock.cmake 2016-01-29 08:18:22 +0000 | |||
45 | +++ cmake/FindGtestGmock.cmake 2016-02-28 23:45:57 +0000 | |||
46 | @@ -20,7 +20,7 @@ | |||
47 | 20 | set(GMOCK_BINARY_DIR ${CMAKE_BINARY_DIR}/${GMOCK_PREFIX}/libs) | 20 | set(GMOCK_BINARY_DIR ${CMAKE_BINARY_DIR}/${GMOCK_PREFIX}/libs) |
48 | 21 | set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest) | 21 | set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest) |
49 | 22 | 22 | ||
51 | 23 | set(GTEST_CXX_FLAGS "-fPIC") | 23 | set(GTEST_CXX_FLAGS "-fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64") |
52 | 24 | if (cmake_build_type_lower MATCHES "threadsanitizer") | 24 | if (cmake_build_type_lower MATCHES "threadsanitizer") |
53 | 25 | set(GTEST_CXX_FLAGS "${GTEST_CXX_FLAGS} -fsanitize=thread") | 25 | set(GTEST_CXX_FLAGS "${GTEST_CXX_FLAGS} -fsanitize=thread") |
54 | 26 | elseif (cmake_build_type_lower MATCHES "ubsanitizer") | 26 | elseif (cmake_build_type_lower MATCHES "ubsanitizer") |
55 | 27 | 27 | ||
56 | === modified file 'cmake/MirCommon.cmake' | |||
57 | --- cmake/MirCommon.cmake 2016-02-22 03:59:29 +0000 | |||
58 | +++ cmake/MirCommon.cmake 2016-02-28 23:45:57 +0000 | |||
59 | @@ -150,11 +150,15 @@ | |||
60 | 150 | endif() | 150 | endif() |
61 | 151 | endfunction() | 151 | endfunction() |
62 | 152 | 152 | ||
63 | 153 | |||
64 | 154 | function (mir_precompiled_header TARGET HEADER) | 153 | function (mir_precompiled_header TARGET HEADER) |
65 | 155 | if (MIR_USE_PRECOMPILED_HEADERS) | 154 | if (MIR_USE_PRECOMPILED_HEADERS) |
67 | 156 | get_property(TARGET_COMPILE_FLAGS TARGET ${TARGET} PROPERTY COMPILE_FLAGS) | 155 | get_filename_component(HEADER_NAME ${HEADER} NAME) |
68 | 156 | |||
69 | 157 | get_property(TARGET_INCLUDE_DIRECTORIES TARGET ${TARGET} PROPERTY INCLUDE_DIRECTORIES) | 157 | get_property(TARGET_INCLUDE_DIRECTORIES TARGET ${TARGET} PROPERTY INCLUDE_DIRECTORIES) |
70 | 158 | |||
71 | 159 | set(TARGET_COMPILE_DEFINITIONS "$<TARGET_PROPERTY:${TARGET},COMPILE_DEFINITIONS>") | ||
72 | 160 | set(TARGET_COMPILE_DEFINITIONS "$<$<BOOL:${TARGET_COMPILE_DEFINITIONS}>:-D$<JOIN:${TARGET_COMPILE_DEFINITIONS},\n-D>\n>") | ||
73 | 161 | |||
74 | 158 | foreach(dir ${TARGET_INCLUDE_DIRECTORIES}) | 162 | foreach(dir ${TARGET_INCLUDE_DIRECTORIES}) |
75 | 159 | if (${dir} MATCHES "usr/include") | 163 | if (${dir} MATCHES "usr/include") |
76 | 160 | set(TARGET_INCLUDE_DIRECTORIES_STRING "${TARGET_INCLUDE_DIRECTORIES_STRING} -isystem ${dir}") | 164 | set(TARGET_INCLUDE_DIRECTORIES_STRING "${TARGET_INCLUDE_DIRECTORIES_STRING} -isystem ${dir}") |
77 | @@ -174,15 +178,44 @@ | |||
78 | 174 | # | 178 | # |
79 | 175 | # I'm unaware of a less roundabout method of getting the *actual* build flags for a target. | 179 | # I'm unaware of a less roundabout method of getting the *actual* build flags for a target. |
80 | 176 | string(TOUPPER "${CMAKE_BUILD_TYPE}" UC_BUILD_TYPE) | 180 | string(TOUPPER "${CMAKE_BUILD_TYPE}" UC_BUILD_TYPE) |
86 | 177 | separate_arguments( | 181 | |
87 | 178 | PCH_CXX_FLAGS UNIX_COMMAND | 182 | # Lllloook at you, haaacker. A pa-pa-pathetic creature of meat and bone. |
88 | 179 | "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UC_BUILD_TYPE}} ${TARGET_COMPILE_FLAGS} ${TARGET_INCLUDE_DIRECTORIES_STRING}" | 183 | # |
89 | 180 | ) | 184 | # It appears that we can *only* get the COMPILE_DEFINITIONS as a generator expression. |
90 | 181 | 185 | # This wouldn't be so bad if http://www.kwwidgets.org/Bug/view.php?id=14353#c33712 didn't mean | |
91 | 186 | # that you can't use generator expressions in custom commands. | ||
92 | 187 | # | ||
93 | 188 | # So! | ||
94 | 189 | # What we *can* do is generate a file with the contents of the generator expressions, | ||
95 | 190 | # then use gcc's @file mechanism... | ||
96 | 191 | set(FLAGS_FILE "${CMAKE_CURRENT_BINARY_DIR}/${HEADER_NAME}.compileflags") | ||
97 | 192 | |||
98 | 193 | file( | ||
99 | 194 | GENERATE | ||
100 | 195 | OUTPUT "${FLAGS_FILE}" | ||
101 | 196 | CONTENT " | ||
102 | 197 | ${CMAKE_CXX_FLAGS} | ||
103 | 198 | ${CMAKE_CXX_FLAGS_${UC_BUILD_TYPE}} | ||
104 | 199 | ${TARGET_INCLUDE_DIRECTORIES_STRING} | ||
105 | 200 | ${TARGET_COMPILE_DEFINITIONS}" | ||
106 | 201 | ) | ||
107 | 202 | |||
108 | 203 | # HA HA! | ||
109 | 204 | # | ||
110 | 205 | # Of course, that has unescaped all the escaped \"s we have in the compile definitions. | ||
111 | 206 | # gcc treats the contents of @file exactly as if it came from the command line, so we need to | ||
112 | 207 | # re-escape them. | ||
113 | 208 | add_custom_command( | ||
114 | 209 | OUTPUT ${FLAGS_FILE}.processed | ||
115 | 210 | DEPENDS ${FLAGS_FILE} | ||
116 | 211 | # ESCAPE ALL THE THINGS! | ||
117 | 212 | COMMAND sh -c "sed s_\\\"_\\\\\\\\\\\"_g ${FLAGS_FILE} > ${FLAGS_FILE}.processed" | ||
118 | 213 | VERBATIM | ||
119 | 214 | ) | ||
120 | 182 | add_custom_command( | 215 | add_custom_command( |
121 | 183 | OUTPUT ${TARGET}_precompiled.hpp.gch | 216 | OUTPUT ${TARGET}_precompiled.hpp.gch |
124 | 184 | DEPENDS ${HEADER} | 217 | DEPENDS ${HEADER} ${FLAGS_FILE}.processed |
125 | 185 | COMMAND ${CMAKE_CXX_COMPILER} ${PCH_CXX_FLAGS} -x c++-header -c ${HEADER} -o ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_precompiled.hpp.gch | 218 | COMMAND ${CMAKE_CXX_COMPILER} @${FLAGS_FILE}.processed -x c++-header -c ${HEADER} -o ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_precompiled.hpp.gch |
126 | 186 | ) | 219 | ) |
127 | 187 | 220 | ||
128 | 188 | set_property(TARGET ${TARGET} APPEND_STRING PROPERTY COMPILE_FLAGS " -include ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_precompiled.hpp -Winvalid-pch ") | 221 | set_property(TARGET ${TARGET} APPEND_STRING PROPERTY COMPILE_FLAGS " -include ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_precompiled.hpp -Winvalid-pch ") |
129 | 189 | 222 | ||
130 | === modified file 'debian/rules' | |||
131 | --- debian/rules 2016-02-23 05:12:14 +0000 | |||
132 | +++ debian/rules 2016-02-28 23:45:57 +0000 | |||
133 | @@ -20,7 +20,13 @@ | |||
134 | 20 | endif | 20 | endif |
135 | 21 | 21 | ||
136 | 22 | COMMON_CONFIGURE_OPTIONS = \ | 22 | COMMON_CONFIGURE_OPTIONS = \ |
138 | 23 | -DCMAKE_INSTALL_LIBEXECDIR="lib/$(DEB_HOST_MULTIARCH)/mir" | 23 | -DCMAKE_INSTALL_LIBEXECDIR="lib/$(DEB_HOST_MULTIARCH)/mir"\ |
139 | 24 | |||
140 | 25 | ifeq ($(filter noopt,$(DEB_BUILD_OPTIONS)),noopt) | ||
141 | 26 | COMMON_CONFIGURE_OPTIONS += -DMIR_LINK_TIME_OPTIMIZATION=OFF | ||
142 | 27 | else | ||
143 | 28 | COMMON_CONFIGURE_OPTIONS += -DMIR_LINK_TIME_OPTIMIZATION=ON | ||
144 | 29 | endif | ||
145 | 24 | 30 | ||
146 | 25 | override_dh_auto_configure: | 31 | override_dh_auto_configure: |
147 | 26 | ifeq ($(DEB_HOST_ARCH),armhf) | 32 | ifeq ($(DEB_HOST_ARCH),armhf) |
148 | 27 | 33 | ||
149 | === modified file 'examples/CMakeLists.txt' | |||
150 | --- examples/CMakeLists.txt 2016-02-26 02:31:41 +0000 | |||
151 | +++ examples/CMakeLists.txt 2016-02-28 23:45:57 +0000 | |||
152 | @@ -41,8 +41,6 @@ | |||
153 | 41 | xcursor.h | 41 | xcursor.h |
154 | 42 | ) | 42 | ) |
155 | 43 | 43 | ||
156 | 44 | SET_SOURCE_FILES_PROPERTIES(xcursor.c PROPERTIES COMPILE_FLAGS -D_GNU_SOURCE) | ||
157 | 45 | |||
158 | 46 | target_link_libraries(eglapp | 44 | target_link_libraries(eglapp |
159 | 47 | mirclient | 45 | mirclient |
160 | 48 | ${EGL_LIBRARIES} | 46 | ${EGL_LIBRARIES} |
161 | 49 | 47 | ||
162 | === modified file 'examples/animated_cursor_demo_client.c' | |||
163 | --- examples/animated_cursor_demo_client.c 2016-02-22 03:59:29 +0000 | |||
164 | +++ examples/animated_cursor_demo_client.c 2016-02-28 23:45:57 +0000 | |||
165 | @@ -16,8 +16,6 @@ | |||
166 | 16 | * Author: Robert Carr <robert.carr@canonical.com> | 16 | * Author: Robert Carr <robert.carr@canonical.com> |
167 | 17 | */ | 17 | */ |
168 | 18 | 18 | ||
169 | 19 | #define _GNU_SOURCE | ||
170 | 20 | |||
171 | 21 | #include "eglapp.h" | 19 | #include "eglapp.h" |
172 | 22 | 20 | ||
173 | 23 | #include "mir_toolkit/mir_client_library.h" | 21 | #include "mir_toolkit/mir_client_library.h" |
174 | 24 | 22 | ||
175 | === modified file 'src/client/buffer_stream.cpp' | |||
176 | --- src/client/buffer_stream.cpp 2016-02-10 06:31:19 +0000 | |||
177 | +++ src/client/buffer_stream.cpp 2016-02-28 23:45:57 +0000 | |||
178 | @@ -572,7 +572,7 @@ | |||
179 | 572 | EGLNativeWindowType mcl::BufferStream::egl_native_window() | 572 | EGLNativeWindowType mcl::BufferStream::egl_native_window() |
180 | 573 | { | 573 | { |
181 | 574 | std::unique_lock<decltype(mutex)> lock(mutex); | 574 | std::unique_lock<decltype(mutex)> lock(mutex); |
183 | 575 | return *egl_native_window_; | 575 | return static_cast<EGLNativeWindowType>(egl_native_window_.get()); |
184 | 576 | } | 576 | } |
185 | 577 | 577 | ||
186 | 578 | void mcl::BufferStream::release_cpu_region() | 578 | void mcl::BufferStream::release_cpu_region() |
187 | 579 | 579 | ||
188 | === modified file 'src/client/buffer_stream.h' | |||
189 | --- src/client/buffer_stream.h 2016-02-10 06:31:19 +0000 | |||
190 | +++ src/client/buffer_stream.h 2016-02-28 23:45:57 +0000 | |||
191 | @@ -147,7 +147,7 @@ | |||
192 | 147 | float scale_; | 147 | float scale_; |
193 | 148 | 148 | ||
194 | 149 | std::shared_ptr<mir::client::PerfReport> const perf_report; | 149 | std::shared_ptr<mir::client::PerfReport> const perf_report; |
196 | 150 | std::shared_ptr<EGLNativeWindowType> egl_native_window_; | 150 | std::shared_ptr<void> egl_native_window_; |
197 | 151 | 151 | ||
198 | 152 | MirWaitHandle interval_wait_handle; | 152 | MirWaitHandle interval_wait_handle; |
199 | 153 | std::unique_ptr<mir::protobuf::Void> protobuf_void; | 153 | std::unique_ptr<mir::protobuf::Void> protobuf_void; |
200 | 154 | 154 | ||
201 | === modified file 'src/client/client_buffer_stream.h' | |||
202 | --- src/client/client_buffer_stream.h 2016-02-22 03:59:29 +0000 | |||
203 | +++ src/client/client_buffer_stream.h 2016-02-28 23:45:57 +0000 | |||
204 | @@ -27,10 +27,33 @@ | |||
205 | 27 | #include "mir_toolkit/mir_native_buffer.h" | 27 | #include "mir_toolkit/mir_native_buffer.h" |
206 | 28 | #include "mir_wait_handle.h" | 28 | #include "mir_wait_handle.h" |
207 | 29 | 29 | ||
208 | 30 | #include <EGL/eglplatform.h> | ||
209 | 31 | |||
210 | 32 | #include <memory> | 30 | #include <memory> |
211 | 33 | #include <functional> | 31 | #include <functional> |
212 | 32 | #include <EGL/eglplatform.h> | ||
213 | 33 | |||
214 | 34 | /* | ||
215 | 35 | * ClientBufferStream::egl_native_window() returns EGLNativeWindowType. | ||
216 | 36 | * | ||
217 | 37 | * EGLNativeWindowType is an EGL platform-specific type that is typically a | ||
218 | 38 | * (possibly slightly obfuscated) pointer. This makes our client module ABI | ||
219 | 39 | * technically EGL-platform dependent, which is awkward because we support | ||
220 | 40 | * multiple EGL platforms. | ||
221 | 41 | * | ||
222 | 42 | * On both the Mesa and the Android EGL platforms EGLNativeWindow is a | ||
223 | 43 | * pointer or a uintptr_t. | ||
224 | 44 | * | ||
225 | 45 | * In practise EGLNativeWindowType is always a typedef to a pointer-ish, but | ||
226 | 46 | * for paranoia's sake make sure the build will fail if we ever encounter a | ||
227 | 47 | * strange EGL platform where this isn't the case. | ||
228 | 48 | */ | ||
229 | 49 | #include <type_traits> | ||
230 | 50 | static_assert( | ||
231 | 51 | sizeof(EGLNativeWindowType) == sizeof(void*) && | ||
232 | 52 | std::is_pod<EGLNativeWindowType>::value, | ||
233 | 53 | "The ClientBufferStream requires that EGLNativeWindowType be no-op convertible to void*"); | ||
234 | 54 | |||
235 | 55 | #undef EGLNativeWindowType | ||
236 | 56 | #define EGLNativeWindowType void* | ||
237 | 34 | 57 | ||
238 | 35 | namespace mir | 58 | namespace mir |
239 | 36 | { | 59 | { |
240 | 37 | 60 | ||
241 | === modified file 'src/client/lttng/CMakeLists.txt' | |||
242 | --- src/client/lttng/CMakeLists.txt 2015-06-17 05:20:42 +0000 | |||
243 | +++ src/client/lttng/CMakeLists.txt 2016-02-28 23:45:57 +0000 | |||
244 | @@ -10,6 +10,11 @@ | |||
245 | 10 | perf_report.cpp | 10 | perf_report.cpp |
246 | 11 | ) | 11 | ) |
247 | 12 | 12 | ||
248 | 13 | # Using LTO on the lttng DSO causes a gcc ICE. | ||
249 | 14 | # Since LTO is reasonably uninteresting for the lttng tracer, disable it. | ||
250 | 15 | string(REPLACE "-flto" "" NO_LTO_FLAGS ${CMAKE_C_FLAGS}) | ||
251 | 16 | set(CMAKE_C_FLAGS ${NO_LTO_FLAGS}) | ||
252 | 17 | |||
253 | 13 | add_library(mirclientlttng SHARED tracepoints.c) | 18 | add_library(mirclientlttng SHARED tracepoints.c) |
254 | 14 | 19 | ||
255 | 15 | # Don't treat missing-field-initializers as an error, since | 20 | # Don't treat missing-field-initializers as an error, since |
256 | 16 | 21 | ||
257 | === modified file 'src/client/screencast_stream.cpp' | |||
258 | --- src/client/screencast_stream.cpp 2016-01-28 19:05:20 +0000 | |||
259 | +++ src/client/screencast_stream.cpp 2016-02-28 23:45:57 +0000 | |||
260 | @@ -148,7 +148,7 @@ | |||
261 | 148 | 148 | ||
262 | 149 | EGLNativeWindowType mcl::ScreencastStream::egl_native_window() | 149 | EGLNativeWindowType mcl::ScreencastStream::egl_native_window() |
263 | 150 | { | 150 | { |
265 | 151 | return *egl_native_window_; | 151 | return static_cast<EGLNativeWindowType>(egl_native_window_.get()); |
266 | 152 | } | 152 | } |
267 | 153 | 153 | ||
268 | 154 | std::shared_ptr<mcl::MemoryRegion> mcl::ScreencastStream::secure_for_cpu_write() | 154 | std::shared_ptr<mcl::MemoryRegion> mcl::ScreencastStream::secure_for_cpu_write() |
269 | 155 | 155 | ||
270 | === modified file 'src/client/screencast_stream.h' | |||
271 | --- src/client/screencast_stream.h 2016-01-28 17:26:23 +0000 | |||
272 | +++ src/client/screencast_stream.h 2016-02-28 23:45:57 +0000 | |||
273 | @@ -113,7 +113,7 @@ | |||
274 | 113 | std::unique_ptr<mir::protobuf::BufferStream> protobuf_bs; | 113 | std::unique_ptr<mir::protobuf::BufferStream> protobuf_bs; |
275 | 114 | int const swap_interval_{1}; | 114 | int const swap_interval_{1}; |
276 | 115 | 115 | ||
278 | 116 | std::shared_ptr<EGLNativeWindowType> egl_native_window_; | 116 | std::shared_ptr<void> egl_native_window_; |
279 | 117 | 117 | ||
280 | 118 | MirWaitHandle create_wait_handle; | 118 | MirWaitHandle create_wait_handle; |
281 | 119 | MirWaitHandle release_wait_handle; | 119 | MirWaitHandle release_wait_handle; |
282 | 120 | 120 | ||
283 | === modified file 'src/common/sharedlibrary/module_deleter.cpp' | |||
284 | --- src/common/sharedlibrary/module_deleter.cpp 2016-01-29 08:18:22 +0000 | |||
285 | +++ src/common/sharedlibrary/module_deleter.cpp 2016-02-28 23:45:57 +0000 | |||
286 | @@ -20,9 +20,6 @@ | |||
287 | 20 | 20 | ||
288 | 21 | #include "mir/shared_library.h" | 21 | #include "mir/shared_library.h" |
289 | 22 | 22 | ||
290 | 23 | #ifndef _GNU_SOURCE | ||
291 | 24 | #define _GNU_SOURCE | ||
292 | 25 | #endif | ||
293 | 26 | #include <dlfcn.h> | 23 | #include <dlfcn.h> |
294 | 27 | #include <atomic> | 24 | #include <atomic> |
295 | 28 | 25 | ||
296 | 29 | 26 | ||
297 | === modified file 'src/common/thread/thread_name.cpp' | |||
298 | --- src/common/thread/thread_name.cpp 2015-02-22 07:46:25 +0000 | |||
299 | +++ src/common/thread/thread_name.cpp 2016-02-28 23:45:57 +0000 | |||
300 | @@ -18,9 +18,6 @@ | |||
301 | 18 | 18 | ||
302 | 19 | #include "mir/thread_name.h" | 19 | #include "mir/thread_name.h" |
303 | 20 | 20 | ||
304 | 21 | #ifndef _GNU_SOURCE | ||
305 | 22 | #define _GNU_SOURCE | ||
306 | 23 | #endif | ||
307 | 24 | #include <pthread.h> | 21 | #include <pthread.h> |
308 | 25 | 22 | ||
309 | 26 | void mir::set_thread_name(std::string const& name) | 23 | void mir::set_thread_name(std::string const& name) |
310 | 27 | 24 | ||
311 | === modified file 'src/include/client/mir/client_platform.h' | |||
312 | --- src/include/client/mir/client_platform.h 2016-01-29 08:18:22 +0000 | |||
313 | +++ src/include/client/mir/client_platform.h 2016-02-28 23:45:57 +0000 | |||
314 | @@ -61,7 +61,9 @@ | |||
315 | 61 | */ | 61 | */ |
316 | 62 | virtual MirPlatformMessage* platform_operation(MirPlatformMessage const* request) = 0; | 62 | virtual MirPlatformMessage* platform_operation(MirPlatformMessage const* request) = 0; |
317 | 63 | virtual std::shared_ptr<ClientBufferFactory> create_buffer_factory() = 0; | 63 | virtual std::shared_ptr<ClientBufferFactory> create_buffer_factory() = 0; |
319 | 64 | virtual std::shared_ptr<EGLNativeWindowType> create_egl_native_window(EGLNativeSurface *surface) = 0; | 64 | // EGLNativeWindowType differs between platforms, so can't reasonably be used in the |
320 | 65 | // platform-independent interface. | ||
321 | 66 | virtual std::shared_ptr<void> create_egl_native_window(EGLNativeSurface *surface) = 0; | ||
322 | 65 | virtual std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() = 0; | 67 | virtual std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() = 0; |
323 | 66 | virtual MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const = 0; | 68 | virtual MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const = 0; |
324 | 67 | virtual MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const = 0; | 69 | virtual MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const = 0; |
325 | 68 | 70 | ||
326 | === modified file 'src/platforms/android/client/android_client_platform.cpp' | |||
327 | --- src/platforms/android/client/android_client_platform.cpp 2016-01-29 08:18:22 +0000 | |||
328 | +++ src/platforms/android/client/android_client_platform.cpp 2016-02-28 23:45:57 +0000 | |||
329 | @@ -75,9 +75,8 @@ | |||
330 | 75 | MirNativeWindowDeleter(mga::MirNativeWindow* window) | 75 | MirNativeWindowDeleter(mga::MirNativeWindow* window) |
331 | 76 | : window(window) {} | 76 | : window(window) {} |
332 | 77 | 77 | ||
334 | 78 | void operator()(EGLNativeWindowType* type) | 78 | void operator()(void*) |
335 | 79 | { | 79 | { |
336 | 80 | delete type; | ||
337 | 81 | delete window; | 80 | delete window; |
338 | 82 | } | 81 | } |
339 | 83 | 82 | ||
340 | @@ -86,14 +85,12 @@ | |||
341 | 86 | }; | 85 | }; |
342 | 87 | } | 86 | } |
343 | 88 | 87 | ||
345 | 89 | std::shared_ptr<EGLNativeWindowType> mcla::AndroidClientPlatform::create_egl_native_window(EGLNativeSurface *surface) | 88 | std::shared_ptr<void> mcla::AndroidClientPlatform::create_egl_native_window(EGLNativeSurface *surface) |
346 | 90 | { | 89 | { |
347 | 91 | auto anativewindow_interpreter = std::make_shared<mcla::EGLNativeSurfaceInterpreter>(*surface); | 90 | auto anativewindow_interpreter = std::make_shared<mcla::EGLNativeSurfaceInterpreter>(*surface); |
348 | 92 | auto mir_native_window = new mga::MirNativeWindow(anativewindow_interpreter); | 91 | auto mir_native_window = new mga::MirNativeWindow(anativewindow_interpreter); |
349 | 93 | auto egl_native_window = new EGLNativeWindowType; | ||
350 | 94 | *egl_native_window = mir_native_window; | ||
351 | 95 | MirNativeWindowDeleter deleter = MirNativeWindowDeleter(mir_native_window); | 92 | MirNativeWindowDeleter deleter = MirNativeWindowDeleter(mir_native_window); |
353 | 96 | return std::shared_ptr<EGLNativeWindowType>(egl_native_window, deleter); | 93 | return std::shared_ptr<void>(mir_native_window, deleter); |
354 | 97 | } | 94 | } |
355 | 98 | 95 | ||
356 | 99 | std::shared_ptr<EGLNativeDisplayType> | 96 | std::shared_ptr<EGLNativeDisplayType> |
357 | 100 | 97 | ||
358 | === modified file 'src/platforms/android/client/android_client_platform.h' | |||
359 | --- src/platforms/android/client/android_client_platform.h 2016-01-29 08:18:22 +0000 | |||
360 | +++ src/platforms/android/client/android_client_platform.h 2016-02-28 23:45:57 +0000 | |||
361 | @@ -37,7 +37,7 @@ | |||
362 | 37 | void populate(MirPlatformPackage& package) const override; | 37 | void populate(MirPlatformPackage& package) const override; |
363 | 38 | MirPlatformMessage* platform_operation(MirPlatformMessage const* request) override; | 38 | MirPlatformMessage* platform_operation(MirPlatformMessage const* request) override; |
364 | 39 | std::shared_ptr<ClientBufferFactory> create_buffer_factory() override; | 39 | std::shared_ptr<ClientBufferFactory> create_buffer_factory() override; |
366 | 40 | std::shared_ptr<EGLNativeWindowType> create_egl_native_window(EGLNativeSurface *surface) override; | 40 | std::shared_ptr<void> create_egl_native_window(EGLNativeSurface *surface) override; |
367 | 41 | std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override; | 41 | std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override; |
368 | 42 | MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const override; | 42 | MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const override; |
369 | 43 | MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override; | 43 | MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override; |
370 | 44 | 44 | ||
371 | === modified file 'src/platforms/common/client/mir/aging_buffer.h' | |||
372 | --- src/platforms/common/client/mir/aging_buffer.h 2015-02-22 07:46:25 +0000 | |||
373 | +++ src/platforms/common/client/mir/aging_buffer.h 2016-02-28 23:45:57 +0000 | |||
374 | @@ -31,9 +31,9 @@ | |||
375 | 31 | public: | 31 | public: |
376 | 32 | AgingBuffer(); | 32 | AgingBuffer(); |
377 | 33 | 33 | ||
381 | 34 | virtual uint32_t age() const; | 34 | uint32_t age() const override; |
382 | 35 | virtual void increment_age(); | 35 | void increment_age() override; |
383 | 36 | virtual void mark_as_submitted(); | 36 | void mark_as_submitted() override; |
384 | 37 | 37 | ||
385 | 38 | private: | 38 | private: |
386 | 39 | uint32_t buffer_age; | 39 | uint32_t buffer_age; |
387 | 40 | 40 | ||
388 | === modified file 'src/platforms/mesa/client/client_platform.cpp' | |||
389 | --- src/platforms/mesa/client/client_platform.cpp 2016-01-29 08:18:22 +0000 | |||
390 | +++ src/platforms/mesa/client/client_platform.cpp 2016-02-28 23:45:57 +0000 | |||
391 | @@ -80,9 +80,8 @@ | |||
392 | 80 | NativeWindowDeleter(mclm::NativeSurface* window) | 80 | NativeWindowDeleter(mclm::NativeSurface* window) |
393 | 81 | : window(window) {} | 81 | : window(window) {} |
394 | 82 | 82 | ||
396 | 83 | void operator()(EGLNativeWindowType* type) | 83 | void operator()(void*) |
397 | 84 | { | 84 | { |
398 | 85 | delete type; | ||
399 | 86 | delete window; | 85 | delete window; |
400 | 87 | } | 86 | } |
401 | 88 | 87 | ||
402 | @@ -91,14 +90,12 @@ | |||
403 | 91 | }; | 90 | }; |
404 | 92 | } | 91 | } |
405 | 93 | 92 | ||
407 | 94 | std::shared_ptr<EGLNativeWindowType> mclm::ClientPlatform::create_egl_native_window(EGLNativeSurface* client_surface) | 93 | std::shared_ptr<void> mclm::ClientPlatform::create_egl_native_window(EGLNativeSurface* client_surface) |
408 | 95 | { | 94 | { |
409 | 96 | //TODO: this is awkward on both android and gbm... | 95 | //TODO: this is awkward on both android and gbm... |
410 | 97 | auto native_window = new NativeSurface(*client_surface); | 96 | auto native_window = new NativeSurface(*client_surface); |
411 | 98 | auto egl_native_window = new EGLNativeWindowType; | ||
412 | 99 | *egl_native_window = reinterpret_cast<EGLNativeWindowType>(native_window); | ||
413 | 100 | NativeWindowDeleter deleter(native_window); | 97 | NativeWindowDeleter deleter(native_window); |
415 | 101 | return std::shared_ptr<EGLNativeWindowType>(egl_native_window, deleter); | 98 | return std::shared_ptr<void>(native_window, deleter); |
416 | 102 | } | 99 | } |
417 | 103 | 100 | ||
418 | 104 | std::shared_ptr<EGLNativeDisplayType> mclm::ClientPlatform::create_egl_native_display() | 101 | std::shared_ptr<EGLNativeDisplayType> mclm::ClientPlatform::create_egl_native_display() |
419 | 105 | 102 | ||
420 | === modified file 'src/platforms/mesa/client/client_platform.h' | |||
421 | --- src/platforms/mesa/client/client_platform.h 2016-01-29 08:18:22 +0000 | |||
422 | +++ src/platforms/mesa/client/client_platform.h 2016-02-28 23:45:57 +0000 | |||
423 | @@ -45,7 +45,7 @@ | |||
424 | 45 | void populate(MirPlatformPackage& package) const override; | 45 | void populate(MirPlatformPackage& package) const override; |
425 | 46 | MirPlatformMessage* platform_operation(MirPlatformMessage const* request) override; | 46 | MirPlatformMessage* platform_operation(MirPlatformMessage const* request) override; |
426 | 47 | std::shared_ptr<ClientBufferFactory> create_buffer_factory() override; | 47 | std::shared_ptr<ClientBufferFactory> create_buffer_factory() override; |
428 | 48 | std::shared_ptr<EGLNativeWindowType> create_egl_native_window(EGLNativeSurface *surface) override; | 48 | std::shared_ptr<void> create_egl_native_window(EGLNativeSurface *surface) override; |
429 | 49 | std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override; | 49 | std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override; |
430 | 50 | MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const override; | 50 | MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const override; |
431 | 51 | MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override; | 51 | MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override; |
432 | 52 | 52 | ||
433 | === modified file 'src/server/report/lttng/CMakeLists.txt' | |||
434 | --- src/server/report/lttng/CMakeLists.txt 2015-04-28 07:54:10 +0000 | |||
435 | +++ src/server/report/lttng/CMakeLists.txt 2016-02-28 23:45:57 +0000 | |||
436 | @@ -5,6 +5,11 @@ | |||
437 | 5 | # harmless; it concerns a padding field) | 5 | # harmless; it concerns a padding field) |
438 | 6 | add_compile_options(-Wno-error=missing-field-initializers -Wno-error=unused-function) | 6 | add_compile_options(-Wno-error=missing-field-initializers -Wno-error=unused-function) |
439 | 7 | 7 | ||
440 | 8 | # Using LTO on the lttng DSO causes a gcc ICE. | ||
441 | 9 | # Since LTO is reasonably uninteresting for the lttng tracer, disable it. | ||
442 | 10 | string(REPLACE "-flto" "" NO_LTO_FLAGS ${CMAKE_C_FLAGS}) | ||
443 | 11 | set(CMAKE_C_FLAGS ${NO_LTO_FLAGS}) | ||
444 | 12 | |||
445 | 8 | set( | 13 | set( |
446 | 9 | LTTNG_SOURCES | 14 | LTTNG_SOURCES |
447 | 10 | 15 | ||
448 | 11 | 16 | ||
449 | === modified file 'tests/acceptance-tests/throwback/test_client_library_errors.cpp' | |||
450 | --- tests/acceptance-tests/throwback/test_client_library_errors.cpp 2016-01-29 08:18:22 +0000 | |||
451 | +++ tests/acceptance-tests/throwback/test_client_library_errors.cpp 2016-02-28 23:45:57 +0000 | |||
452 | @@ -65,7 +65,7 @@ | |||
453 | 65 | template<Method failure_set> | 65 | template<Method failure_set> |
454 | 66 | class ConfigurableFailurePlatform : public mir::client::ClientPlatform | 66 | class ConfigurableFailurePlatform : public mir::client::ClientPlatform |
455 | 67 | { | 67 | { |
457 | 68 | std::shared_ptr<EGLNativeWindowType> create_egl_native_window(mir::client::EGLNativeSurface *) | 68 | std::shared_ptr<void> create_egl_native_window(mir::client::EGLNativeSurface *) |
458 | 69 | { | 69 | { |
459 | 70 | if (should_fail<Method::create_egl_native_window, failure_set>()) | 70 | if (should_fail<Method::create_egl_native_window, failure_set>()) |
460 | 71 | { | 71 | { |
461 | 72 | 72 | ||
462 | === modified file 'tests/include/mir_test_framework/client_platform_factory.h' | |||
463 | --- tests/include/mir_test_framework/client_platform_factory.h 2016-01-29 08:18:22 +0000 | |||
464 | +++ tests/include/mir_test_framework/client_platform_factory.h 2016-02-28 23:45:57 +0000 | |||
465 | @@ -31,6 +31,22 @@ | |||
466 | 31 | { | 31 | { |
467 | 32 | std::shared_ptr<mir::SharedLibrary> platform_library; | 32 | std::shared_ptr<mir::SharedLibrary> platform_library; |
468 | 33 | 33 | ||
469 | 34 | namespace | ||
470 | 35 | { | ||
471 | 36 | std::shared_ptr<mir::client::ClientPlatform> wrap_in_platform_library_cleanup( | ||
472 | 37 | std::shared_ptr<mir::client::ClientPlatform>&& platform) | ||
473 | 38 | { | ||
474 | 39 | return std::shared_ptr<mir::client::ClientPlatform>{ | ||
475 | 40 | platform.get(), | ||
476 | 41 | [platform](mir::client::ClientPlatform*) mutable | ||
477 | 42 | { | ||
478 | 43 | platform.reset(); | ||
479 | 44 | platform_library.reset(); | ||
480 | 45 | } | ||
481 | 46 | }; | ||
482 | 47 | } | ||
483 | 48 | } | ||
484 | 49 | |||
485 | 34 | std::shared_ptr<mir::client::ClientPlatform> create_android_client_platform() | 50 | std::shared_ptr<mir::client::ClientPlatform> create_android_client_platform() |
486 | 35 | { | 51 | { |
487 | 36 | using namespace testing; | 52 | using namespace testing; |
488 | @@ -39,7 +55,8 @@ | |||
489 | 39 | .WillByDefault(Invoke([](MirPlatformPackage& package) { ::memset(&package, 0, sizeof(package)); })); | 55 | .WillByDefault(Invoke([](MirPlatformPackage& package) { ::memset(&package, 0, sizeof(package)); })); |
490 | 40 | platform_library = std::make_shared<mir::SharedLibrary>(client_platform("android")); | 56 | platform_library = std::make_shared<mir::SharedLibrary>(client_platform("android")); |
491 | 41 | auto platform_factory = platform_library->load_function<mir::client::CreateClientPlatform>("create_client_platform"); | 57 | auto platform_factory = platform_library->load_function<mir::client::CreateClientPlatform>("create_client_platform"); |
493 | 42 | return platform_factory(&ctx); | 58 | |
494 | 59 | return wrap_in_platform_library_cleanup(platform_factory(&ctx)); | ||
495 | 43 | } | 60 | } |
496 | 44 | 61 | ||
497 | 45 | std::shared_ptr<mir::client::ClientPlatform> create_mesa_client_platform( | 62 | std::shared_ptr<mir::client::ClientPlatform> create_mesa_client_platform( |
498 | @@ -48,7 +65,8 @@ | |||
499 | 48 | using namespace testing; | 65 | using namespace testing; |
500 | 49 | platform_library = std::make_shared<mir::SharedLibrary>(client_platform("mesa")); | 66 | platform_library = std::make_shared<mir::SharedLibrary>(client_platform("mesa")); |
501 | 50 | auto platform_factory = platform_library->load_function<mir::client::CreateClientPlatform>("create_client_platform"); | 67 | auto platform_factory = platform_library->load_function<mir::client::CreateClientPlatform>("create_client_platform"); |
503 | 51 | return platform_factory(client_context); | 68 | |
504 | 69 | return wrap_in_platform_library_cleanup(platform_factory(client_context)); | ||
505 | 52 | } | 70 | } |
506 | 53 | 71 | ||
507 | 54 | std::shared_ptr<mir::SharedLibrary> | 72 | std::shared_ptr<mir::SharedLibrary> |
508 | 55 | 73 | ||
509 | === modified file 'tests/include/mir_test_framework/stub_client_platform_factory.h' | |||
510 | --- tests/include/mir_test_framework/stub_client_platform_factory.h 2016-01-20 23:58:36 +0000 | |||
511 | +++ tests/include/mir_test_framework/stub_client_platform_factory.h 2016-02-28 23:45:57 +0000 | |||
512 | @@ -32,7 +32,7 @@ | |||
513 | 32 | void populate(MirPlatformPackage& package) const; | 32 | void populate(MirPlatformPackage& package) const; |
514 | 33 | MirPlatformMessage* platform_operation(MirPlatformMessage const*) override; | 33 | MirPlatformMessage* platform_operation(MirPlatformMessage const*) override; |
515 | 34 | std::shared_ptr<mir::client::ClientBufferFactory> create_buffer_factory(); | 34 | std::shared_ptr<mir::client::ClientBufferFactory> create_buffer_factory(); |
517 | 35 | std::shared_ptr<EGLNativeWindowType> create_egl_native_window(mir::client::EGLNativeSurface* surface); | 35 | std::shared_ptr<void> create_egl_native_window(mir::client::EGLNativeSurface* surface); |
518 | 36 | std::shared_ptr<EGLNativeDisplayType> create_egl_native_display(); | 36 | std::shared_ptr<EGLNativeDisplayType> create_egl_native_display(); |
519 | 37 | MirNativeBuffer* convert_native_buffer(mir::graphics::NativeBuffer* buf) const; | 37 | MirNativeBuffer* convert_native_buffer(mir::graphics::NativeBuffer* buf) const; |
520 | 38 | MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override; | 38 | MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override; |
521 | 39 | 39 | ||
522 | === modified file 'tests/mir_test/current_thread_name.cpp' | |||
523 | --- tests/mir_test/current_thread_name.cpp 2015-06-25 03:00:08 +0000 | |||
524 | +++ tests/mir_test/current_thread_name.cpp 2016-02-28 23:45:57 +0000 | |||
525 | @@ -18,9 +18,6 @@ | |||
526 | 18 | 18 | ||
527 | 19 | #include "mir/test/current_thread_name.h" | 19 | #include "mir/test/current_thread_name.h" |
528 | 20 | 20 | ||
529 | 21 | #ifndef _GNU_SOURCE | ||
530 | 22 | #define _GNU_SOURCE | ||
531 | 23 | #endif | ||
532 | 24 | #include <pthread.h> | 21 | #include <pthread.h> |
533 | 25 | 22 | ||
534 | 26 | std::string mir::test::current_thread_name() | 23 | std::string mir::test::current_thread_name() |
535 | 27 | 24 | ||
536 | === modified file 'tests/mir_test_framework/stub_client_platform_factory.cpp' | |||
537 | --- tests/mir_test_framework/stub_client_platform_factory.cpp 2016-01-29 08:18:22 +0000 | |||
538 | +++ tests/mir_test_framework/stub_client_platform_factory.cpp 2016-02-28 23:45:57 +0000 | |||
539 | @@ -55,10 +55,9 @@ | |||
540 | 55 | return std::make_shared<mtd::StubClientBufferFactory>(); | 55 | return std::make_shared<mtd::StubClientBufferFactory>(); |
541 | 56 | } | 56 | } |
542 | 57 | 57 | ||
544 | 58 | std::shared_ptr<EGLNativeWindowType> mtf::StubClientPlatform::create_egl_native_window(mir::client::EGLNativeSurface* surface) | 58 | std::shared_ptr<void> mtf::StubClientPlatform::create_egl_native_window(mir::client::EGLNativeSurface* surface) |
545 | 59 | { | 59 | { |
548 | 60 | auto fake_window = reinterpret_cast<EGLNativeWindowType>(surface); | 60 | return std::shared_ptr<void>{surface, [](void*){}}; |
547 | 61 | return std::make_shared<EGLNativeWindowType>(fake_window); | ||
549 | 62 | } | 61 | } |
550 | 63 | 62 | ||
551 | 64 | std::shared_ptr<EGLNativeDisplayType> mtf::StubClientPlatform::create_egl_native_display() | 63 | std::shared_ptr<EGLNativeDisplayType> mtf::StubClientPlatform::create_egl_native_display() |
552 | 65 | 64 | ||
553 | === modified file 'tests/unit-tests/client/test_client_buffer_stream.cpp' | |||
554 | --- tests/unit-tests/client/test_client_buffer_stream.cpp 2016-02-23 20:08:23 +0000 | |||
555 | +++ tests/unit-tests/client/test_client_buffer_stream.cpp 2016-02-28 23:45:57 +0000 | |||
556 | @@ -68,9 +68,9 @@ | |||
557 | 68 | void populate(MirPlatformPackage& /* package */) const override | 68 | void populate(MirPlatformPackage& /* package */) const override |
558 | 69 | { | 69 | { |
559 | 70 | } | 70 | } |
561 | 71 | std::shared_ptr<EGLNativeWindowType> create_egl_native_window(mcl::EGLNativeSurface * /* surface */) override | 71 | std::shared_ptr<void> create_egl_native_window(mcl::EGLNativeSurface * /* surface */) override |
562 | 72 | { | 72 | { |
564 | 73 | return std::make_shared<EGLNativeWindowType>(egl_native_window); | 73 | return mt::fake_shared(egl_native_window); |
565 | 74 | } | 74 | } |
566 | 75 | std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override | 75 | std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override |
567 | 76 | { | 76 | { |
568 | 77 | 77 | ||
569 | === modified file 'tests/unit-tests/client/test_client_platform.cpp' | |||
570 | --- tests/unit-tests/client/test_client_platform.cpp 2016-01-29 08:18:22 +0000 | |||
571 | +++ tests/unit-tests/client/test_client_platform.cpp 2016-02-28 23:45:57 +0000 | |||
572 | @@ -141,7 +141,7 @@ | |||
573 | 141 | auto platform = create_client_platform(&context); | 141 | auto platform = create_client_platform(&context); |
574 | 142 | auto mock_client_surface = std::make_shared<mtd::MockEGLNativeSurface>(); | 142 | auto mock_client_surface = std::make_shared<mtd::MockEGLNativeSurface>(); |
575 | 143 | auto native_window = platform->create_egl_native_window(mock_client_surface.get()); | 143 | auto native_window = platform->create_egl_native_window(mock_client_surface.get()); |
577 | 144 | EXPECT_NE(*native_window, (EGLNativeWindowType) NULL); | 144 | EXPECT_THAT(native_window.get(), testing::Ne(nullptr)); |
578 | 145 | } | 145 | } |
579 | 146 | 146 | ||
580 | 147 | TEST_P(ClientPlatformTest, platform_creates_egl_native_display) | 147 | TEST_P(ClientPlatformTest, platform_creates_egl_native_display) |
581 | 148 | 148 | ||
582 | === modified file 'tests/unit-tests/client/test_mir_connection.cpp' | |||
583 | --- tests/unit-tests/client/test_mir_connection.cpp 2016-02-23 16:12:59 +0000 | |||
584 | +++ tests/unit-tests/client/test_mir_connection.cpp 2016-02-28 23:45:57 +0000 | |||
585 | @@ -176,7 +176,7 @@ | |||
586 | 176 | MOCK_CONST_METHOD0(platform_type, MirPlatformType()); | 176 | MOCK_CONST_METHOD0(platform_type, MirPlatformType()); |
587 | 177 | MOCK_METHOD1(platform_operation, MirPlatformMessage*(MirPlatformMessage const*)); | 177 | MOCK_METHOD1(platform_operation, MirPlatformMessage*(MirPlatformMessage const*)); |
588 | 178 | MOCK_METHOD0(create_buffer_factory, std::shared_ptr<mcl::ClientBufferFactory>()); | 178 | MOCK_METHOD0(create_buffer_factory, std::shared_ptr<mcl::ClientBufferFactory>()); |
590 | 179 | MOCK_METHOD1(create_egl_native_window, std::shared_ptr<EGLNativeWindowType>(mcl::EGLNativeSurface*)); | 179 | MOCK_METHOD1(create_egl_native_window, std::shared_ptr<void>(mcl::EGLNativeSurface*)); |
591 | 180 | MOCK_METHOD0(create_egl_native_display, std::shared_ptr<EGLNativeDisplayType>()); | 180 | MOCK_METHOD0(create_egl_native_display, std::shared_ptr<EGLNativeDisplayType>()); |
592 | 181 | MOCK_CONST_METHOD2(get_egl_pixel_format, | 181 | MOCK_CONST_METHOD2(get_egl_pixel_format, |
593 | 182 | MirPixelFormat(EGLDisplay, EGLConfig)); | 182 | MirPixelFormat(EGLDisplay, EGLConfig)); |
FAILED: Continuous integration, rev:3218 jenkins. qa.ubuntu. com/job/ mir-ci/ 5916/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/5407 jenkins. qa.ubuntu. com/job/ mir-clang- vivid-amd64- build/4314 jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/5360/ console jenkins. qa.ubuntu. com/job/ mir-xenial- amd64-ci/ 242 jenkins. qa.ubuntu. com/job/ mir-xenial- amd64-ci/ 242/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-xenial- i386-ci/ 242/console jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 5357/console
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/5916/ rebuild
http://