Mir

Merge lp:~raof/mir/fix-and-enable-lto into lp:mir

Proposed by Chris Halse Rogers
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
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.

Fixes: https://bugs.launchpad.net/mir/+bug/1350343

Description of the change

Fix LTO build, and enable it for Debian packages.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Chris Halse Rogers (raof) wrote : Posted in a previous version of this proposal

/usr/include/i386-linux-gnu/bits/stat.h:46:8: error: type 'struct stat' violates one definition rule [-Werror=odr]
 struct stat
        ^
/usr/include/i386-linux-gnu/bits/stat.h:46:0: note: a different type is defined in another translation unit
 struct stat
 ^
/usr/include/i386-linux-gnu/bits/stat.h:53:13: note: the first difference of corresponding definitions is field 'st_ino'
     __ino_t st_ino; /* File serial number. */
             ^
/usr/include/i386-linux-gnu/bits/stat.h:55:13: note: a field with different name is defined in another translation unit
     __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.

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal

hmm will gcc-nm and gcc-ar work for cross compilation?

review: Needs Information
Revision history for this message
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-builder-vivid-armhf. Of course.

Revision history for this message
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

review: Approve
Revision history for this message
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.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:3236
https://mir-jenkins.ubuntu.com/job/mir-ci/15/
Executed test runs:
    None: https://mir-jenkins.ubuntu.com/job/generic-update-mp/15/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/15/rebuild

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3238
https://mir-jenkins.ubuntu.com/job/mir-ci/23/
Executed test runs:
    None: https://mir-jenkins.ubuntu.com/job/generic-update-mp/23/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/23/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

https://jenkins.qa.ubuntu.com/job/mir-mediumtests-runner-touch/7917/consoleFull says

[1452488342.218071] mirserver: Selected driver: android (version 0.19.0)
ERROR: Dynamic exception type: St12system_error
std::exception::what: Enable multithreading to use std::thread: Operation not permitted

Do we need to clutter cmake with more pthread flags?

Apart from that. I can live with that fancy solution.

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Apart from the android failure looks good.

Should we also force use of gold with LTO?

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

There is now a conflict, when resolved there is a chance that the problem on vivid/armhf is gone.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3341
https://mir-jenkins.ubuntu.com/job/mir-ci/398/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/194
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/211
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/207
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/207
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/199
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/199/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/199
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/199/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/199
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/199/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/199
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/199/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/398/rebuild

review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

+static_assert(
+ std::is_pointer<EGLNativeWindowType>::value ||
+ sizeof(EGLNativeWindowType) == sizeof(void*),
+ "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/eglplatform.h>).

What's the reasoning for this approach and should we have a single wrapper header for all uses?

review: Needs Information
Revision history for this message
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.

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3348
https://mir-jenkins.ubuntu.com/job/mir-ci/405/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/205/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/229
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/221
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/221
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/211/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/211
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/211/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/211/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/211/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/211
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/211/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/405/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Chris Halse Rogers (raof) wrote :

Ah, there it is.

Different layouts for BufferStream because EGLNativeWindowType differs...

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3349
https://mir-jenkins.ubuntu.com/job/mir-ci/408/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/208/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/232
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/224
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/224
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/214/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/214
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/214/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/214
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/214/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/214
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/214/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/214
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/214/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/408/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
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.

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3349
https://mir-jenkins.ubuntu.com/job/mir-ci/409/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/209
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/233
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/225
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/225
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/216
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/216/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/216
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/216/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/216
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/216/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/216
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/216/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/216
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/216/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/409/rebuild

review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

+ -DMIR_LINK_TIME_OPTIMIZATION=ON

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.)

review: Needs Information
Revision history for this message
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

review: Approve
Revision history for this message
Chris Halse Rogers (raof) wrote :

Ok. I've gated MIR_LINK_TIME_OPTIMIZATION on the presence or absence of “noopt” in the DEB_BUILD_OPTIONS environment variable. This is a standard interface for Debian package builds.

I've also started to hook this up to CI, so that we pass DEB_BUILD_OPTIONS=noopt for normal builds (so we'll get slightly faster -O0 builds for normal CI) and not pass it for autolanding.

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.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

LGTM

review: Approve
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3350
https://mir-jenkins.ubuntu.com/job/mir-ci/432/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/242/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/266
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/258
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/258
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/249
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/249/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/249
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/249/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/249
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/249/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/249
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/249/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/249/console
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/249/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/432/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3350
https://mir-jenkins.ubuntu.com/job/mir-ci/452/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/268
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/292
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/284
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/284
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/276
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/276/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/276
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/276/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/276
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/276/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/276
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/276/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/276
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/276/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/452/rebuild

review: Approve (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-02-25 17:58:32 +0000
+++ CMakeLists.txt 2016-02-28 23:45:57 +0000
@@ -34,6 +34,8 @@
34add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR})34add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR})
35add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR})35add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR})
36add_definitions(-DMIR_VERSION_MICRO=${MIR_VERSION_PATCH})36add_definitions(-DMIR_VERSION_MICRO=${MIR_VERSION_PATCH})
37add_definitions(-D_GNU_SOURCE)
38add_definitions(-D_FILE_OFFSET_BITS=64)
3739
38set(MIR_VERSION ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}.${MIR_VERSION_PATCH})40set(MIR_VERSION ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}.${MIR_VERSION_PATCH})
3941
@@ -81,6 +83,11 @@
81if(MIR_LINK_TIME_OPTIMIZATION)83if(MIR_LINK_TIME_OPTIMIZATION)
82 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto")84 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto")
83 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto")85 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto")
86 if(${CMAKE_COMPILER_IS_GNUCXX})
87 set(CMAKE_NM "gcc-nm")
88 set(CMAKE_AR "gcc-ar")
89 set(CMAKE_RANLIB "gcc-ranlib")
90 endif()
84endif()91endif()
8592
86string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower)93string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower)
8794
=== modified file 'benchmarks/frame-uniformity/CMakeLists.txt'
--- benchmarks/frame-uniformity/CMakeLists.txt 2016-01-29 08:18:22 +0000
+++ benchmarks/frame-uniformity/CMakeLists.txt 2016-02-28 23:45:57 +0000
@@ -15,6 +15,12 @@
15 ${PROJECT_SOURCE_DIR}/tests/include/15 ${PROJECT_SOURCE_DIR}/tests/include/
16)16)
1717
18# We use mir-test-{doubles,framework}, which builds differently based on
19# the primary test platform.
20if (MIR_TEST_PLATFORM STREQUAL "android")
21 add_definitions(-DANDROID)
22endif()
23
18mir_add_wrapped_executable(frame_uniformity_test_client NOINSTALL24mir_add_wrapped_executable(frame_uniformity_test_client NOINSTALL
19 touch_measuring_client.cpp25 touch_measuring_client.cpp
20 touch_producing_server.cpp26 touch_producing_server.cpp
2127
=== modified file 'cmake/FindGtestGmock.cmake'
--- cmake/FindGtestGmock.cmake 2016-01-29 08:18:22 +0000
+++ cmake/FindGtestGmock.cmake 2016-02-28 23:45:57 +0000
@@ -20,7 +20,7 @@
20set(GMOCK_BINARY_DIR ${CMAKE_BINARY_DIR}/${GMOCK_PREFIX}/libs)20set(GMOCK_BINARY_DIR ${CMAKE_BINARY_DIR}/${GMOCK_PREFIX}/libs)
21set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)21set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)
2222
23set(GTEST_CXX_FLAGS "-fPIC")23set(GTEST_CXX_FLAGS "-fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64")
24if (cmake_build_type_lower MATCHES "threadsanitizer")24if (cmake_build_type_lower MATCHES "threadsanitizer")
25 set(GTEST_CXX_FLAGS "${GTEST_CXX_FLAGS} -fsanitize=thread")25 set(GTEST_CXX_FLAGS "${GTEST_CXX_FLAGS} -fsanitize=thread")
26elseif (cmake_build_type_lower MATCHES "ubsanitizer")26elseif (cmake_build_type_lower MATCHES "ubsanitizer")
2727
=== modified file 'cmake/MirCommon.cmake'
--- cmake/MirCommon.cmake 2016-02-22 03:59:29 +0000
+++ cmake/MirCommon.cmake 2016-02-28 23:45:57 +0000
@@ -150,11 +150,15 @@
150 endif()150 endif()
151endfunction()151endfunction()
152152
153
154function (mir_precompiled_header TARGET HEADER)153function (mir_precompiled_header TARGET HEADER)
155 if (MIR_USE_PRECOMPILED_HEADERS)154 if (MIR_USE_PRECOMPILED_HEADERS)
156 get_property(TARGET_COMPILE_FLAGS TARGET ${TARGET} PROPERTY COMPILE_FLAGS)155 get_filename_component(HEADER_NAME ${HEADER} NAME)
156
157 get_property(TARGET_INCLUDE_DIRECTORIES TARGET ${TARGET} PROPERTY INCLUDE_DIRECTORIES)157 get_property(TARGET_INCLUDE_DIRECTORIES TARGET ${TARGET} PROPERTY INCLUDE_DIRECTORIES)
158
159 set(TARGET_COMPILE_DEFINITIONS "$<TARGET_PROPERTY:${TARGET},COMPILE_DEFINITIONS>")
160 set(TARGET_COMPILE_DEFINITIONS "$<$<BOOL:${TARGET_COMPILE_DEFINITIONS}>:-D$<JOIN:${TARGET_COMPILE_DEFINITIONS},\n-D>\n>")
161
158 foreach(dir ${TARGET_INCLUDE_DIRECTORIES})162 foreach(dir ${TARGET_INCLUDE_DIRECTORIES})
159 if (${dir} MATCHES "usr/include")163 if (${dir} MATCHES "usr/include")
160 set(TARGET_INCLUDE_DIRECTORIES_STRING "${TARGET_INCLUDE_DIRECTORIES_STRING} -isystem ${dir}")164 set(TARGET_INCLUDE_DIRECTORIES_STRING "${TARGET_INCLUDE_DIRECTORIES_STRING} -isystem ${dir}")
@@ -174,15 +178,44 @@
174 #178 #
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.
176 string(TOUPPER "${CMAKE_BUILD_TYPE}" UC_BUILD_TYPE)180 string(TOUPPER "${CMAKE_BUILD_TYPE}" UC_BUILD_TYPE)
177 separate_arguments(181
178 PCH_CXX_FLAGS UNIX_COMMAND182 # Lllloook at you, haaacker. A pa-pa-pathetic creature of meat and bone.
179 "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UC_BUILD_TYPE}} ${TARGET_COMPILE_FLAGS} ${TARGET_INCLUDE_DIRECTORIES_STRING}"183 #
180 )184 # It appears that we can *only* get the COMPILE_DEFINITIONS as a generator expression.
181185 # This wouldn't be so bad if http://www.kwwidgets.org/Bug/view.php?id=14353#c33712 didn't mean
186 # that you can't use generator expressions in custom commands.
187 #
188 # So!
189 # What we *can* do is generate a file with the contents of the generator expressions,
190 # then use gcc's @file mechanism...
191 set(FLAGS_FILE "${CMAKE_CURRENT_BINARY_DIR}/${HEADER_NAME}.compileflags")
192
193 file(
194 GENERATE
195 OUTPUT "${FLAGS_FILE}"
196 CONTENT "
197 ${CMAKE_CXX_FLAGS}
198 ${CMAKE_CXX_FLAGS_${UC_BUILD_TYPE}}
199 ${TARGET_INCLUDE_DIRECTORIES_STRING}
200 ${TARGET_COMPILE_DEFINITIONS}"
201 )
202
203 # HA HA!
204 #
205 # Of course, that has unescaped all the escaped \"s we have in the compile definitions.
206 # gcc treats the contents of @file exactly as if it came from the command line, so we need to
207 # re-escape them.
208 add_custom_command(
209 OUTPUT ${FLAGS_FILE}.processed
210 DEPENDS ${FLAGS_FILE}
211 # ESCAPE ALL THE THINGS!
212 COMMAND sh -c "sed s_\\\"_\\\\\\\\\\\"_g ${FLAGS_FILE} > ${FLAGS_FILE}.processed"
213 VERBATIM
214 )
182 add_custom_command(215 add_custom_command(
183 OUTPUT ${TARGET}_precompiled.hpp.gch216 OUTPUT ${TARGET}_precompiled.hpp.gch
184 DEPENDS ${HEADER}217 DEPENDS ${HEADER} ${FLAGS_FILE}.processed
185 COMMAND ${CMAKE_CXX_COMPILER} ${PCH_CXX_FLAGS} -x c++-header -c ${HEADER} -o ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_precompiled.hpp.gch218 COMMAND ${CMAKE_CXX_COMPILER} @${FLAGS_FILE}.processed -x c++-header -c ${HEADER} -o ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_precompiled.hpp.gch
186 )219 )
187220
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 ")
189222
=== modified file 'debian/rules'
--- debian/rules 2016-02-23 05:12:14 +0000
+++ debian/rules 2016-02-28 23:45:57 +0000
@@ -20,7 +20,13 @@
20endif20endif
2121
22COMMON_CONFIGURE_OPTIONS = \22COMMON_CONFIGURE_OPTIONS = \
23 -DCMAKE_INSTALL_LIBEXECDIR="lib/$(DEB_HOST_MULTIARCH)/mir"23 -DCMAKE_INSTALL_LIBEXECDIR="lib/$(DEB_HOST_MULTIARCH)/mir"\
24
25ifeq ($(filter noopt,$(DEB_BUILD_OPTIONS)),noopt)
26 COMMON_CONFIGURE_OPTIONS += -DMIR_LINK_TIME_OPTIMIZATION=OFF
27else
28 COMMON_CONFIGURE_OPTIONS += -DMIR_LINK_TIME_OPTIMIZATION=ON
29endif
2430
25override_dh_auto_configure:31override_dh_auto_configure:
26ifeq ($(DEB_HOST_ARCH),armhf)32ifeq ($(DEB_HOST_ARCH),armhf)
2733
=== modified file 'examples/CMakeLists.txt'
--- examples/CMakeLists.txt 2016-02-26 02:31:41 +0000
+++ examples/CMakeLists.txt 2016-02-28 23:45:57 +0000
@@ -41,8 +41,6 @@
41 xcursor.h41 xcursor.h
42)42)
4343
44SET_SOURCE_FILES_PROPERTIES(xcursor.c PROPERTIES COMPILE_FLAGS -D_GNU_SOURCE)
45
46target_link_libraries(eglapp44target_link_libraries(eglapp
47 mirclient45 mirclient
48 ${EGL_LIBRARIES}46 ${EGL_LIBRARIES}
4947
=== modified file 'examples/animated_cursor_demo_client.c'
--- examples/animated_cursor_demo_client.c 2016-02-22 03:59:29 +0000
+++ examples/animated_cursor_demo_client.c 2016-02-28 23:45:57 +0000
@@ -16,8 +16,6 @@
16 * Author: Robert Carr <robert.carr@canonical.com>16 * Author: Robert Carr <robert.carr@canonical.com>
17 */17 */
1818
19#define _GNU_SOURCE
20
21#include "eglapp.h"19#include "eglapp.h"
2220
23#include "mir_toolkit/mir_client_library.h"21#include "mir_toolkit/mir_client_library.h"
2422
=== modified file 'src/client/buffer_stream.cpp'
--- src/client/buffer_stream.cpp 2016-02-10 06:31:19 +0000
+++ src/client/buffer_stream.cpp 2016-02-28 23:45:57 +0000
@@ -572,7 +572,7 @@
572EGLNativeWindowType mcl::BufferStream::egl_native_window()572EGLNativeWindowType mcl::BufferStream::egl_native_window()
573{573{
574 std::unique_lock<decltype(mutex)> lock(mutex);574 std::unique_lock<decltype(mutex)> lock(mutex);
575 return *egl_native_window_;575 return static_cast<EGLNativeWindowType>(egl_native_window_.get());
576}576}
577577
578void mcl::BufferStream::release_cpu_region()578void mcl::BufferStream::release_cpu_region()
579579
=== modified file 'src/client/buffer_stream.h'
--- src/client/buffer_stream.h 2016-02-10 06:31:19 +0000
+++ src/client/buffer_stream.h 2016-02-28 23:45:57 +0000
@@ -147,7 +147,7 @@
147 float scale_;147 float scale_;
148148
149 std::shared_ptr<mir::client::PerfReport> const perf_report;149 std::shared_ptr<mir::client::PerfReport> const perf_report;
150 std::shared_ptr<EGLNativeWindowType> egl_native_window_;150 std::shared_ptr<void> egl_native_window_;
151151
152 MirWaitHandle interval_wait_handle;152 MirWaitHandle interval_wait_handle;
153 std::unique_ptr<mir::protobuf::Void> protobuf_void;153 std::unique_ptr<mir::protobuf::Void> protobuf_void;
154154
=== modified file 'src/client/client_buffer_stream.h'
--- src/client/client_buffer_stream.h 2016-02-22 03:59:29 +0000
+++ src/client/client_buffer_stream.h 2016-02-28 23:45:57 +0000
@@ -27,10 +27,33 @@
27#include "mir_toolkit/mir_native_buffer.h"27#include "mir_toolkit/mir_native_buffer.h"
28#include "mir_wait_handle.h"28#include "mir_wait_handle.h"
2929
30#include <EGL/eglplatform.h>
31
32#include <memory>30#include <memory>
33#include <functional>31#include <functional>
32#include <EGL/eglplatform.h>
33
34/*
35 * ClientBufferStream::egl_native_window() returns EGLNativeWindowType.
36 *
37 * EGLNativeWindowType is an EGL platform-specific type that is typically a
38 * (possibly slightly obfuscated) pointer. This makes our client module ABI
39 * technically EGL-platform dependent, which is awkward because we support
40 * multiple EGL platforms.
41 *
42 * On both the Mesa and the Android EGL platforms EGLNativeWindow is a
43 * pointer or a uintptr_t.
44 *
45 * In practise EGLNativeWindowType is always a typedef to a pointer-ish, but
46 * for paranoia's sake make sure the build will fail if we ever encounter a
47 * strange EGL platform where this isn't the case.
48 */
49#include <type_traits>
50static_assert(
51 sizeof(EGLNativeWindowType) == sizeof(void*) &&
52 std::is_pod<EGLNativeWindowType>::value,
53 "The ClientBufferStream requires that EGLNativeWindowType be no-op convertible to void*");
54
55#undef EGLNativeWindowType
56#define EGLNativeWindowType void*
3457
35namespace mir58namespace mir
36{59{
3760
=== modified file 'src/client/lttng/CMakeLists.txt'
--- src/client/lttng/CMakeLists.txt 2015-06-17 05:20:42 +0000
+++ src/client/lttng/CMakeLists.txt 2016-02-28 23:45:57 +0000
@@ -10,6 +10,11 @@
10 perf_report.cpp10 perf_report.cpp
11)11)
1212
13# Using LTO on the lttng DSO causes a gcc ICE.
14# Since LTO is reasonably uninteresting for the lttng tracer, disable it.
15string(REPLACE "-flto" "" NO_LTO_FLAGS ${CMAKE_C_FLAGS})
16set(CMAKE_C_FLAGS ${NO_LTO_FLAGS})
17
13add_library(mirclientlttng SHARED tracepoints.c)18add_library(mirclientlttng SHARED tracepoints.c)
1419
15# Don't treat missing-field-initializers as an error, since20# Don't treat missing-field-initializers as an error, since
1621
=== modified file 'src/client/screencast_stream.cpp'
--- src/client/screencast_stream.cpp 2016-01-28 19:05:20 +0000
+++ src/client/screencast_stream.cpp 2016-02-28 23:45:57 +0000
@@ -148,7 +148,7 @@
148148
149EGLNativeWindowType mcl::ScreencastStream::egl_native_window()149EGLNativeWindowType mcl::ScreencastStream::egl_native_window()
150{150{
151 return *egl_native_window_;151 return static_cast<EGLNativeWindowType>(egl_native_window_.get());
152}152}
153153
154std::shared_ptr<mcl::MemoryRegion> mcl::ScreencastStream::secure_for_cpu_write()154std::shared_ptr<mcl::MemoryRegion> mcl::ScreencastStream::secure_for_cpu_write()
155155
=== modified file 'src/client/screencast_stream.h'
--- src/client/screencast_stream.h 2016-01-28 17:26:23 +0000
+++ src/client/screencast_stream.h 2016-02-28 23:45:57 +0000
@@ -113,7 +113,7 @@
113 std::unique_ptr<mir::protobuf::BufferStream> protobuf_bs;113 std::unique_ptr<mir::protobuf::BufferStream> protobuf_bs;
114 int const swap_interval_{1};114 int const swap_interval_{1};
115115
116 std::shared_ptr<EGLNativeWindowType> egl_native_window_;116 std::shared_ptr<void> egl_native_window_;
117117
118 MirWaitHandle create_wait_handle;118 MirWaitHandle create_wait_handle;
119 MirWaitHandle release_wait_handle;119 MirWaitHandle release_wait_handle;
120120
=== modified file 'src/common/sharedlibrary/module_deleter.cpp'
--- src/common/sharedlibrary/module_deleter.cpp 2016-01-29 08:18:22 +0000
+++ src/common/sharedlibrary/module_deleter.cpp 2016-02-28 23:45:57 +0000
@@ -20,9 +20,6 @@
2020
21#include "mir/shared_library.h"21#include "mir/shared_library.h"
2222
23#ifndef _GNU_SOURCE
24#define _GNU_SOURCE
25#endif
26#include <dlfcn.h>23#include <dlfcn.h>
27#include <atomic>24#include <atomic>
2825
2926
=== modified file 'src/common/thread/thread_name.cpp'
--- src/common/thread/thread_name.cpp 2015-02-22 07:46:25 +0000
+++ src/common/thread/thread_name.cpp 2016-02-28 23:45:57 +0000
@@ -18,9 +18,6 @@
1818
19#include "mir/thread_name.h"19#include "mir/thread_name.h"
2020
21#ifndef _GNU_SOURCE
22#define _GNU_SOURCE
23#endif
24#include <pthread.h>21#include <pthread.h>
2522
26void mir::set_thread_name(std::string const& name)23void mir::set_thread_name(std::string const& name)
2724
=== modified file 'src/include/client/mir/client_platform.h'
--- src/include/client/mir/client_platform.h 2016-01-29 08:18:22 +0000
+++ src/include/client/mir/client_platform.h 2016-02-28 23:45:57 +0000
@@ -61,7 +61,9 @@
61 */61 */
62 virtual MirPlatformMessage* platform_operation(MirPlatformMessage const* request) = 0;62 virtual MirPlatformMessage* platform_operation(MirPlatformMessage const* request) = 0;
63 virtual std::shared_ptr<ClientBufferFactory> create_buffer_factory() = 0;63 virtual std::shared_ptr<ClientBufferFactory> create_buffer_factory() = 0;
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
65 // platform-independent interface.
66 virtual std::shared_ptr<void> create_egl_native_window(EGLNativeSurface *surface) = 0;
65 virtual std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() = 0;67 virtual std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() = 0;
66 virtual MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const = 0;68 virtual MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const = 0;
67 virtual MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const = 0;69 virtual MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const = 0;
6870
=== modified file 'src/platforms/android/client/android_client_platform.cpp'
--- src/platforms/android/client/android_client_platform.cpp 2016-01-29 08:18:22 +0000
+++ src/platforms/android/client/android_client_platform.cpp 2016-02-28 23:45:57 +0000
@@ -75,9 +75,8 @@
75 MirNativeWindowDeleter(mga::MirNativeWindow* window)75 MirNativeWindowDeleter(mga::MirNativeWindow* window)
76 : window(window) {}76 : window(window) {}
7777
78 void operator()(EGLNativeWindowType* type)78 void operator()(void*)
79 {79 {
80 delete type;
81 delete window;80 delete window;
82 }81 }
8382
@@ -86,14 +85,12 @@
86};85};
87}86}
8887
89std::shared_ptr<EGLNativeWindowType> mcla::AndroidClientPlatform::create_egl_native_window(EGLNativeSurface *surface)88std::shared_ptr<void> mcla::AndroidClientPlatform::create_egl_native_window(EGLNativeSurface *surface)
90{89{
91 auto anativewindow_interpreter = std::make_shared<mcla::EGLNativeSurfaceInterpreter>(*surface);90 auto anativewindow_interpreter = std::make_shared<mcla::EGLNativeSurfaceInterpreter>(*surface);
92 auto mir_native_window = new mga::MirNativeWindow(anativewindow_interpreter);91 auto mir_native_window = new mga::MirNativeWindow(anativewindow_interpreter);
93 auto egl_native_window = new EGLNativeWindowType;
94 *egl_native_window = mir_native_window;
95 MirNativeWindowDeleter deleter = MirNativeWindowDeleter(mir_native_window);92 MirNativeWindowDeleter deleter = MirNativeWindowDeleter(mir_native_window);
96 return std::shared_ptr<EGLNativeWindowType>(egl_native_window, deleter);93 return std::shared_ptr<void>(mir_native_window, deleter);
97}94}
9895
99std::shared_ptr<EGLNativeDisplayType>96std::shared_ptr<EGLNativeDisplayType>
10097
=== modified file 'src/platforms/android/client/android_client_platform.h'
--- src/platforms/android/client/android_client_platform.h 2016-01-29 08:18:22 +0000
+++ src/platforms/android/client/android_client_platform.h 2016-02-28 23:45:57 +0000
@@ -37,7 +37,7 @@
37 void populate(MirPlatformPackage& package) const override;37 void populate(MirPlatformPackage& package) const override;
38 MirPlatformMessage* platform_operation(MirPlatformMessage const* request) override;38 MirPlatformMessage* platform_operation(MirPlatformMessage const* request) override;
39 std::shared_ptr<ClientBufferFactory> create_buffer_factory() override;39 std::shared_ptr<ClientBufferFactory> create_buffer_factory() override;
40 std::shared_ptr<EGLNativeWindowType> create_egl_native_window(EGLNativeSurface *surface) override;40 std::shared_ptr<void> create_egl_native_window(EGLNativeSurface *surface) override;
41 std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override;41 std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override;
42 MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const override;42 MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const override;
43 MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override;43 MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override;
4444
=== modified file 'src/platforms/common/client/mir/aging_buffer.h'
--- src/platforms/common/client/mir/aging_buffer.h 2015-02-22 07:46:25 +0000
+++ src/platforms/common/client/mir/aging_buffer.h 2016-02-28 23:45:57 +0000
@@ -31,9 +31,9 @@
31public:31public:
32 AgingBuffer();32 AgingBuffer();
3333
34 virtual uint32_t age() const;34 uint32_t age() const override;
35 virtual void increment_age();35 void increment_age() override;
36 virtual void mark_as_submitted();36 void mark_as_submitted() override;
3737
38private:38private:
39 uint32_t buffer_age;39 uint32_t buffer_age;
4040
=== modified file 'src/platforms/mesa/client/client_platform.cpp'
--- src/platforms/mesa/client/client_platform.cpp 2016-01-29 08:18:22 +0000
+++ src/platforms/mesa/client/client_platform.cpp 2016-02-28 23:45:57 +0000
@@ -80,9 +80,8 @@
80 NativeWindowDeleter(mclm::NativeSurface* window)80 NativeWindowDeleter(mclm::NativeSurface* window)
81 : window(window) {}81 : window(window) {}
8282
83 void operator()(EGLNativeWindowType* type)83 void operator()(void*)
84 {84 {
85 delete type;
86 delete window;85 delete window;
87 }86 }
8887
@@ -91,14 +90,12 @@
91};90};
92}91}
9392
94std::shared_ptr<EGLNativeWindowType> mclm::ClientPlatform::create_egl_native_window(EGLNativeSurface* client_surface)93std::shared_ptr<void> mclm::ClientPlatform::create_egl_native_window(EGLNativeSurface* client_surface)
95{94{
96 //TODO: this is awkward on both android and gbm...95 //TODO: this is awkward on both android and gbm...
97 auto native_window = new NativeSurface(*client_surface);96 auto native_window = new NativeSurface(*client_surface);
98 auto egl_native_window = new EGLNativeWindowType;
99 *egl_native_window = reinterpret_cast<EGLNativeWindowType>(native_window);
100 NativeWindowDeleter deleter(native_window);97 NativeWindowDeleter deleter(native_window);
101 return std::shared_ptr<EGLNativeWindowType>(egl_native_window, deleter);98 return std::shared_ptr<void>(native_window, deleter);
102}99}
103100
104std::shared_ptr<EGLNativeDisplayType> mclm::ClientPlatform::create_egl_native_display()101std::shared_ptr<EGLNativeDisplayType> mclm::ClientPlatform::create_egl_native_display()
105102
=== modified file 'src/platforms/mesa/client/client_platform.h'
--- src/platforms/mesa/client/client_platform.h 2016-01-29 08:18:22 +0000
+++ src/platforms/mesa/client/client_platform.h 2016-02-28 23:45:57 +0000
@@ -45,7 +45,7 @@
45 void populate(MirPlatformPackage& package) const override;45 void populate(MirPlatformPackage& package) const override;
46 MirPlatformMessage* platform_operation(MirPlatformMessage const* request) override;46 MirPlatformMessage* platform_operation(MirPlatformMessage const* request) override;
47 std::shared_ptr<ClientBufferFactory> create_buffer_factory() override;47 std::shared_ptr<ClientBufferFactory> create_buffer_factory() override;
48 std::shared_ptr<EGLNativeWindowType> create_egl_native_window(EGLNativeSurface *surface) override;48 std::shared_ptr<void> create_egl_native_window(EGLNativeSurface *surface) override;
49 std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override;49 std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override;
50 MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const override;50 MirNativeBuffer* convert_native_buffer(graphics::NativeBuffer*) const override;
51 MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override;51 MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override;
5252
=== modified file 'src/server/report/lttng/CMakeLists.txt'
--- src/server/report/lttng/CMakeLists.txt 2015-04-28 07:54:10 +0000
+++ src/server/report/lttng/CMakeLists.txt 2016-02-28 23:45:57 +0000
@@ -5,6 +5,11 @@
5# harmless; it concerns a padding field)5# harmless; it concerns a padding field)
6add_compile_options(-Wno-error=missing-field-initializers -Wno-error=unused-function)6add_compile_options(-Wno-error=missing-field-initializers -Wno-error=unused-function)
77
8# Using LTO on the lttng DSO causes a gcc ICE.
9# Since LTO is reasonably uninteresting for the lttng tracer, disable it.
10string(REPLACE "-flto" "" NO_LTO_FLAGS ${CMAKE_C_FLAGS})
11set(CMAKE_C_FLAGS ${NO_LTO_FLAGS})
12
8set(13set(
9 LTTNG_SOURCES14 LTTNG_SOURCES
1015
1116
=== modified file 'tests/acceptance-tests/throwback/test_client_library_errors.cpp'
--- tests/acceptance-tests/throwback/test_client_library_errors.cpp 2016-01-29 08:18:22 +0000
+++ tests/acceptance-tests/throwback/test_client_library_errors.cpp 2016-02-28 23:45:57 +0000
@@ -65,7 +65,7 @@
65template<Method failure_set>65template<Method failure_set>
66class ConfigurableFailurePlatform : public mir::client::ClientPlatform66class ConfigurableFailurePlatform : public mir::client::ClientPlatform
67{67{
68 std::shared_ptr<EGLNativeWindowType> create_egl_native_window(mir::client::EGLNativeSurface *)68 std::shared_ptr<void> create_egl_native_window(mir::client::EGLNativeSurface *)
69 {69 {
70 if (should_fail<Method::create_egl_native_window, failure_set>())70 if (should_fail<Method::create_egl_native_window, failure_set>())
71 {71 {
7272
=== modified file 'tests/include/mir_test_framework/client_platform_factory.h'
--- tests/include/mir_test_framework/client_platform_factory.h 2016-01-29 08:18:22 +0000
+++ tests/include/mir_test_framework/client_platform_factory.h 2016-02-28 23:45:57 +0000
@@ -31,6 +31,22 @@
31{31{
32std::shared_ptr<mir::SharedLibrary> platform_library;32std::shared_ptr<mir::SharedLibrary> platform_library;
3333
34namespace
35{
36std::shared_ptr<mir::client::ClientPlatform> wrap_in_platform_library_cleanup(
37 std::shared_ptr<mir::client::ClientPlatform>&& platform)
38{
39 return std::shared_ptr<mir::client::ClientPlatform>{
40 platform.get(),
41 [platform](mir::client::ClientPlatform*) mutable
42 {
43 platform.reset();
44 platform_library.reset();
45 }
46 };
47}
48}
49
34std::shared_ptr<mir::client::ClientPlatform> create_android_client_platform()50std::shared_ptr<mir::client::ClientPlatform> create_android_client_platform()
35{51{
36 using namespace testing;52 using namespace testing;
@@ -39,7 +55,8 @@
39 .WillByDefault(Invoke([](MirPlatformPackage& package) { ::memset(&package, 0, sizeof(package)); }));55 .WillByDefault(Invoke([](MirPlatformPackage& package) { ::memset(&package, 0, sizeof(package)); }));
40 platform_library = std::make_shared<mir::SharedLibrary>(client_platform("android"));56 platform_library = std::make_shared<mir::SharedLibrary>(client_platform("android"));
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");
42 return platform_factory(&ctx);58
59 return wrap_in_platform_library_cleanup(platform_factory(&ctx));
43}60}
4461
45std::shared_ptr<mir::client::ClientPlatform> create_mesa_client_platform(62std::shared_ptr<mir::client::ClientPlatform> create_mesa_client_platform(
@@ -48,7 +65,8 @@
48 using namespace testing;65 using namespace testing;
49 platform_library = std::make_shared<mir::SharedLibrary>(client_platform("mesa"));66 platform_library = std::make_shared<mir::SharedLibrary>(client_platform("mesa"));
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");
51 return platform_factory(client_context);68
69 return wrap_in_platform_library_cleanup(platform_factory(client_context));
52}70}
5371
54std::shared_ptr<mir::SharedLibrary>72std::shared_ptr<mir::SharedLibrary>
5573
=== modified file 'tests/include/mir_test_framework/stub_client_platform_factory.h'
--- tests/include/mir_test_framework/stub_client_platform_factory.h 2016-01-20 23:58:36 +0000
+++ tests/include/mir_test_framework/stub_client_platform_factory.h 2016-02-28 23:45:57 +0000
@@ -32,7 +32,7 @@
32 void populate(MirPlatformPackage& package) const;32 void populate(MirPlatformPackage& package) const;
33 MirPlatformMessage* platform_operation(MirPlatformMessage const*) override;33 MirPlatformMessage* platform_operation(MirPlatformMessage const*) override;
34 std::shared_ptr<mir::client::ClientBufferFactory> create_buffer_factory();34 std::shared_ptr<mir::client::ClientBufferFactory> create_buffer_factory();
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);
36 std::shared_ptr<EGLNativeDisplayType> create_egl_native_display();36 std::shared_ptr<EGLNativeDisplayType> create_egl_native_display();
37 MirNativeBuffer* convert_native_buffer(mir::graphics::NativeBuffer* buf) const;37 MirNativeBuffer* convert_native_buffer(mir::graphics::NativeBuffer* buf) const;
38 MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override;38 MirPixelFormat get_egl_pixel_format(EGLDisplay, EGLConfig) const override;
3939
=== modified file 'tests/mir_test/current_thread_name.cpp'
--- tests/mir_test/current_thread_name.cpp 2015-06-25 03:00:08 +0000
+++ tests/mir_test/current_thread_name.cpp 2016-02-28 23:45:57 +0000
@@ -18,9 +18,6 @@
1818
19#include "mir/test/current_thread_name.h"19#include "mir/test/current_thread_name.h"
2020
21#ifndef _GNU_SOURCE
22#define _GNU_SOURCE
23#endif
24#include <pthread.h>21#include <pthread.h>
2522
26std::string mir::test::current_thread_name()23std::string mir::test::current_thread_name()
2724
=== modified file 'tests/mir_test_framework/stub_client_platform_factory.cpp'
--- tests/mir_test_framework/stub_client_platform_factory.cpp 2016-01-29 08:18:22 +0000
+++ tests/mir_test_framework/stub_client_platform_factory.cpp 2016-02-28 23:45:57 +0000
@@ -55,10 +55,9 @@
55 return std::make_shared<mtd::StubClientBufferFactory>();55 return std::make_shared<mtd::StubClientBufferFactory>();
56}56}
5757
58std::shared_ptr<EGLNativeWindowType> mtf::StubClientPlatform::create_egl_native_window(mir::client::EGLNativeSurface* surface)58std::shared_ptr<void> mtf::StubClientPlatform::create_egl_native_window(mir::client::EGLNativeSurface* surface)
59{59{
60 auto fake_window = reinterpret_cast<EGLNativeWindowType>(surface);60 return std::shared_ptr<void>{surface, [](void*){}};
61 return std::make_shared<EGLNativeWindowType>(fake_window);
62}61}
6362
64std::shared_ptr<EGLNativeDisplayType> mtf::StubClientPlatform::create_egl_native_display()63std::shared_ptr<EGLNativeDisplayType> mtf::StubClientPlatform::create_egl_native_display()
6564
=== modified file 'tests/unit-tests/client/test_client_buffer_stream.cpp'
--- tests/unit-tests/client/test_client_buffer_stream.cpp 2016-02-23 20:08:23 +0000
+++ tests/unit-tests/client/test_client_buffer_stream.cpp 2016-02-28 23:45:57 +0000
@@ -68,9 +68,9 @@
68 void populate(MirPlatformPackage& /* package */) const override68 void populate(MirPlatformPackage& /* package */) const override
69 {69 {
70 }70 }
71 std::shared_ptr<EGLNativeWindowType> create_egl_native_window(mcl::EGLNativeSurface * /* surface */) override71 std::shared_ptr<void> create_egl_native_window(mcl::EGLNativeSurface * /* surface */) override
72 {72 {
73 return std::make_shared<EGLNativeWindowType>(egl_native_window);73 return mt::fake_shared(egl_native_window);
74 }74 }
75 std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override75 std::shared_ptr<EGLNativeDisplayType> create_egl_native_display() override
76 {76 {
7777
=== modified file 'tests/unit-tests/client/test_client_platform.cpp'
--- tests/unit-tests/client/test_client_platform.cpp 2016-01-29 08:18:22 +0000
+++ tests/unit-tests/client/test_client_platform.cpp 2016-02-28 23:45:57 +0000
@@ -141,7 +141,7 @@
141 auto platform = create_client_platform(&context);141 auto platform = create_client_platform(&context);
142 auto mock_client_surface = std::make_shared<mtd::MockEGLNativeSurface>();142 auto mock_client_surface = std::make_shared<mtd::MockEGLNativeSurface>();
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());
144 EXPECT_NE(*native_window, (EGLNativeWindowType) NULL);144 EXPECT_THAT(native_window.get(), testing::Ne(nullptr));
145}145}
146146
147TEST_P(ClientPlatformTest, platform_creates_egl_native_display)147TEST_P(ClientPlatformTest, platform_creates_egl_native_display)
148148
=== modified file 'tests/unit-tests/client/test_mir_connection.cpp'
--- tests/unit-tests/client/test_mir_connection.cpp 2016-02-23 16:12:59 +0000
+++ tests/unit-tests/client/test_mir_connection.cpp 2016-02-28 23:45:57 +0000
@@ -176,7 +176,7 @@
176 MOCK_CONST_METHOD0(platform_type, MirPlatformType());176 MOCK_CONST_METHOD0(platform_type, MirPlatformType());
177 MOCK_METHOD1(platform_operation, MirPlatformMessage*(MirPlatformMessage const*));177 MOCK_METHOD1(platform_operation, MirPlatformMessage*(MirPlatformMessage const*));
178 MOCK_METHOD0(create_buffer_factory, std::shared_ptr<mcl::ClientBufferFactory>());178 MOCK_METHOD0(create_buffer_factory, std::shared_ptr<mcl::ClientBufferFactory>());
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*));
180 MOCK_METHOD0(create_egl_native_display, std::shared_ptr<EGLNativeDisplayType>());180 MOCK_METHOD0(create_egl_native_display, std::shared_ptr<EGLNativeDisplayType>());
181 MOCK_CONST_METHOD2(get_egl_pixel_format,181 MOCK_CONST_METHOD2(get_egl_pixel_format,
182 MirPixelFormat(EGLDisplay, EGLConfig));182 MirPixelFormat(EGLDisplay, EGLConfig));

Subscribers

People subscribed via source and target branches