| Index: base/native_library_test_library.cc
|
| diff --git a/base/native_library_test_library.cc b/base/native_library_test_library.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..08385066d942ba0966505e76767138a1c6123684
|
| --- /dev/null
|
| +++ b/base/native_library_test_library.cc
|
| @@ -0,0 +1,25 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "build/build_config.h"
|
| +
|
| +#if defined(OS_WIN)
|
| +#define EXPORT __declspec(dllexport)
|
| +#else
|
| +#define EXPORT __attribute__((visibility("default")))
|
| +#endif
|
| +
|
| +extern "C" {
|
| +
|
| +// This symbol name must match the exported symbol in
|
| +// native_library_unittest.cc.
|
| +int EXPORT g_native_library_test_symbol = 0;
|
| +
|
| +int EXPORT GetTestValue() { return 42; }
|
| +
|
| +bool EXPORT IsSameTestSymbolAddress(int* address) {
|
| + return &g_native_library_test_symbol == address;
|
| +}
|
| +
|
| +} // extern "C"
|
|
|