Skip to content

Commit

Permalink
fix zap issue, we should not add unneed functions in zap but fix unde…
Browse files Browse the repository at this point in the history
…fined issue
  • Loading branch information
xylophone21 committed Nov 2, 2021
1 parent 8fdf550 commit 5289a6f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 40 deletions.
5 changes: 5 additions & 0 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,11 @@ config("size_default") {
"-ffunction-sections",
"-fdata-sections",
]

# do not export functions in jni, or --gc-sections will not work and will be some undefined issues
if (current_os == "android") {
cflags += [ "-fvisibility=hidden" ]
}
}

config("stack_protector_default") {
Expand Down
2 changes: 2 additions & 0 deletions src/app/server/java/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ shared_library("jni") {
public_configs = [ "${chip_root}/src:includes" ]

output_dir = "${root_out_dir}/lib/jni/${android_abi}"

ldflags = [ "-Wl,--gc-sections" ]
}

android_library("java") {
Expand Down
4 changes: 2 additions & 2 deletions src/controller/CHIPDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ typedef void (*OnDeviceConnected)(void * context, Device * device);
typedef void (*OnDeviceConnectionFailure)(void * context, NodeId deviceId, CHIP_ERROR error);
typedef void (*OnOpenCommissioningWindow)(void * context, NodeId deviceId, CHIP_ERROR status, SetupPayload payload);

class DLL_EXPORT Device : public Messaging::ExchangeDelegate, public SessionEstablishmentDelegate
class Device : public Messaging::ExchangeDelegate, public SessionEstablishmentDelegate
{
public:
~Device();
Expand Down Expand Up @@ -588,7 +588,7 @@ class DLL_EXPORT Device : public Messaging::ExchangeDelegate, public SessionEsta
* Device when a new message or status update is received from the corresponding
* CHIP device.
*/
class DLL_EXPORT DeviceStatusDelegate
class DeviceStatusDelegate
{
public:
virtual ~DeviceStatusDelegate() {}
Expand Down
2 changes: 2 additions & 0 deletions src/controller/java/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ shared_library("jni") {
public_configs = [ "${chip_root}/src:includes" ]

output_dir = "${root_out_dir}/lib/jni/${android_abi}"

ldflags = [ "-Wl,--gc-sections" ]
}

android_library("java") {
Expand Down
18 changes: 0 additions & 18 deletions zzz_generated/tv-app/zap-generated/CHIPClusters.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 0 additions & 20 deletions zzz_generated/tv-app/zap-generated/CHIPClusters.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5289a6f

Please sign in to comment.