diff --git a/common/BUILD.gn b/common/BUILD.gn index 74c7be178dcabbd7709fa155f4184b3ed93f48a7..0a542d85f3655e7275b75e5c23076119235cf3f8 100644 --- a/common/BUILD.gn +++ b/common/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -56,6 +56,10 @@ ohos_shared_library("distributed_screen_utils") { "LOG_DOMAIN=0xD004140", ] + cflags = [ "-fstack-protector-strong" ] + + cflags_cc = cflags + subsystem_name = "distributedhardware" part_name = "distributed_screen" diff --git a/interfaces/innerkits/native_cpp/screen_sink/BUILD.gn b/interfaces/innerkits/native_cpp/screen_sink/BUILD.gn index ac3d345469c0adbb2db23afbaa964a6f2cfea34a..5c24a5a89f8c062e07fb1836ef5d22c5d71965ca 100644 --- a/interfaces/innerkits/native_cpp/screen_sink/BUILD.gn +++ b/interfaces/innerkits/native_cpp/screen_sink/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -56,6 +56,10 @@ ohos_shared_library("distributed_screen_sink_sdk") { "samgr:samgr_proxy", ] + cflags = [ "-fstack-protector-strong" ] + + cflags_cc = cflags + subsystem_name = "distributedhardware" part_name = "distributed_screen" diff --git a/interfaces/innerkits/native_cpp/screen_source/BUILD.gn b/interfaces/innerkits/native_cpp/screen_source/BUILD.gn index 11cb59bacf277ff2097ddf5fd7dd9b5c3c019ecf..1f483313ef4a11becfe18148c44edf670d0a7d08 100644 --- a/interfaces/innerkits/native_cpp/screen_source/BUILD.gn +++ b/interfaces/innerkits/native_cpp/screen_source/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -57,6 +57,10 @@ ohos_shared_library("distributed_screen_source_sdk") { "samgr:samgr_proxy", ] + cflags = [ "-fstack-protector-strong" ] + + cflags_cc = cflags + subsystem_name = "distributedhardware" part_name = "distributed_screen" diff --git a/screenhandler/BUILD.gn b/screenhandler/BUILD.gn index cd69bbf69390c8e6854f8a02ef022baa31057fb9..b05245dd6f6d1c2f27fb1aae620212d031f98225 100644 --- a/screenhandler/BUILD.gn +++ b/screenhandler/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -55,6 +55,10 @@ ohos_shared_library("distributed_screen_handler") { "window_manager:libdm", ] + cflags = [ "-fstack-protector-strong" ] + + cflags_cc = cflags + subsystem_name = "distributedhardware" part_name = "distributed_screen" diff --git a/services/screenclient/BUILD.gn b/services/screenclient/BUILD.gn index f24202fa69f05f0cbbfa4be6f9ef23e9332fb206..095fe7c0c1ea0522bf39bf44b57d3d135b9d2247 100644 --- a/services/screenclient/BUILD.gn +++ b/services/screenclient/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -63,6 +63,10 @@ ohos_shared_library("distributed_screen_client") { "window_manager:libwm", ] + cflags = [ "-fstack-protector-strong" ] + + cflags_cc = cflags + part_name = "distributed_screen" subsystem_name = "distributedhardware" } diff --git a/services/screenservice/sinkservice/BUILD.gn b/services/screenservice/sinkservice/BUILD.gn index 350eeae32d5f1dd033a9fc04fd8f28deb04dbb2b..aff95a13b0b1eaf1bf181bdb4cd5fcc1310898e4 100644 --- a/services/screenservice/sinkservice/BUILD.gn +++ b/services/screenservice/sinkservice/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -98,6 +98,10 @@ ohos_shared_library("distributed_screen_sink") { "window_manager:libdm", ] + cflags = [ "-fstack-protector-strong" ] + + cflags_cc = cflags + subsystem_name = "distributedhardware" part_name = "distributed_screen" diff --git a/services/screenservice/sourceservice/BUILD.gn b/services/screenservice/sourceservice/BUILD.gn index 4d005653579d71059f7643e7aafdddec6eb60f07..64b399f1d9a25aaaaa67680d477f2d96870727ad 100644 --- a/services/screenservice/sourceservice/BUILD.gn +++ b/services/screenservice/sourceservice/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -108,6 +108,10 @@ ohos_shared_library("distributed_screen_source") { "window_manager:libdm", ] + cflags = [ "-fstack-protector-strong" ] + + cflags_cc = cflags + subsystem_name = "distributedhardware" part_name = "distributed_screen" diff --git a/services/screentransport/screensinktrans/BUILD.gn b/services/screentransport/screensinktrans/BUILD.gn index b3ad507cca220567d220792c3eb54530bde41502..309a76e7f236aaf9dce4b32fcf2a9e77aeb7af0f 100644 --- a/services/screentransport/screensinktrans/BUILD.gn +++ b/services/screentransport/screensinktrans/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -81,6 +81,10 @@ ohos_shared_library("distributed_screen_sinktrans") { "media_foundation:media_foundation", ] + cflags = [ "-fstack-protector-strong" ] + + cflags_cc = cflags + subsystem_name = "distributedhardware" part_name = "distributed_screen" diff --git a/services/screentransport/screensourcetrans/BUILD.gn b/services/screentransport/screensourcetrans/BUILD.gn index 0e211a6b956e5f16a8fd1426f4da932b693d8ca8..62a3438d5a6840aaa01788c99ca44d9a6a8e0f00 100644 --- a/services/screentransport/screensourcetrans/BUILD.gn +++ b/services/screentransport/screensourcetrans/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -83,6 +83,10 @@ ohos_shared_library("distributed_screen_sourcetrans") { "media_foundation:media_foundation", ] + cflags = [ "-fstack-protector-strong" ] + + cflags_cc = cflags + subsystem_name = "distributedhardware" part_name = "distributed_screen"