mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Build fixes for older GCC and Ubuntu
- Ubuntu 18.04 ships with GCC 7, which needs `std::move()` when returning an `absl::StatusOr<>` - Ignore C++ AST nodes of type `cindex.TypeKind.UNEXPOSED` in Python generator - Remove default values in `ubuntu-cmake.yml` PiperOrigin-RevId: 347605109 Change-Id: Ibe167249ecf4ef1af1654d63c2e067fc02e5782d
This commit is contained in:
parent
0e8d16e011
commit
07d4d02628
5
.github/workflows/ubuntu-cmake.yml
vendored
5
.github/workflows/ubuntu-cmake.yml
vendored
|
@ -20,21 +20,18 @@ jobs:
|
||||||
|
|
||||||
- name: Create Build Environment
|
- name: Create Build Environment
|
||||||
run: |
|
run: |
|
||||||
pip3 install absl-py clang
|
pip3 install absl-py
|
||||||
cmake -E make_directory ${{runner.workspace}}/build
|
cmake -E make_directory ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
shell: bash
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
run: cmake $GITHUB_WORKSPACE -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
run: cmake $GITHUB_WORKSPACE -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
shell: bash
|
|
||||||
run: cmake --build . --config $BUILD_TYPE
|
run: cmake --build . --config $BUILD_TYPE
|
||||||
|
|
||||||
# TODO(cblichmann): Before enabling this, make sure all OSS tests pass
|
# TODO(cblichmann): Before enabling this, make sure all OSS tests pass
|
||||||
#- name: Test
|
#- name: Test
|
||||||
# working-directory: ${{runner.workspace}}/build
|
# working-directory: ${{runner.workspace}}/build
|
||||||
# shell: bash
|
|
||||||
# run: ctest -C $BUILD_TYPE
|
# run: ctest -C $BUILD_TYPE
|
||||||
|
|
|
@ -49,7 +49,7 @@ absl::StatusOr<std::unique_ptr<Buffer>> Buffer::CreateFromFd(int fd) {
|
||||||
}
|
}
|
||||||
buffer->fd_ = fd;
|
buffer->fd_ = fd;
|
||||||
buffer->size_ = size;
|
buffer->size_ = size;
|
||||||
return buffer;
|
return std::move(buffer); // GCC 7 needs the move (C++ DR #1579)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates a new Buffer of the specified size, backed by a temporary file that
|
// Creates a new Buffer of the specified size, backed by a temporary file that
|
||||||
|
|
|
@ -266,10 +266,10 @@ class Type(object):
|
||||||
if not skip_self:
|
if not skip_self:
|
||||||
result.add(self)
|
result.add(self)
|
||||||
self._tu.search_for_macro_name(self._get_declaration())
|
self._tu.search_for_macro_name(self._get_declaration())
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
raise ValueError('Unhandled kind: {}'.format(self._clang_type.kind))
|
# Ignore all cindex.TypeKind.UNEXPOSED AST nodes
|
||||||
|
return result
|
||||||
|
|
||||||
def _get_related_types_of_typedef(self, result):
|
def _get_related_types_of_typedef(self, result):
|
||||||
# type: (Set[Type]) -> Set[Type]
|
# type: (Set[Type]) -> Set[Type]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user