Skip to content
This repository was archived by the owner on Jun 14, 2022. It is now read-only.

Commit 35d699b

Browse files
authored
Merge pull request #90 from sergeyklay/feature/arm64-build
Provide support to build project under arm64/aarch64
2 parents 269c452 + 98af2fb commit 35d699b

File tree

4 files changed

+78
-1
lines changed

4 files changed

+78
-1
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@ releases, in reverse chronological order.
3737
* Added `-dumpversion` program option alias for `--dumpversion`.
3838
* Amended tests.
3939
* Provided launchd integration for macOS.
40-
40+
* Provided support to build project under arm64/aarch64 architectures.
41+
42+
### Bugfix
43+
44+
* [#87](https://github.com/sergeyklay/pcloud-console-client/issues/87):
45+
Define `_FILE_OFFSET_BITS` to `64` on arm64 architectures.
46+
For more info about this macro refer to
47+
https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html.
48+
4149
### Changes
4250

4351
* Renamed `overlay_callback` pointer to function to `poverlay_callback`.

CMakePresets.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,37 @@
8080
"CMAKE_CXX_COMPILER": "c++",
8181
"PCLOUD_TLS_IMPL": "mbedtls"
8282
}
83+
},
84+
{
85+
"name": "macos-armv8-apple-mbedtls-debug",
86+
"displayName": "macOS armv8: Debug / Apple Clang / Mbed TLS",
87+
"description": "Sets Ninja generator, Clang compiler, build and install directory, debug build type and Mbed TLS implementation",
88+
"generator": "Ninja",
89+
"binaryDir": "${sourceDir}/out/build/${presetName}",
90+
"installDir": "${sourceDir}/out/install/${presetName}",
91+
"architecture": {
92+
"value": "armv8",
93+
"strategy": "external"
94+
},
95+
"condition": {
96+
"type": "equals",
97+
"lhs": "${hostSystemName}",
98+
"rhs": "Darwin"
99+
},
100+
"cacheVariables": {
101+
"CMAKE_BUILD_TYPE": "Debug",
102+
"PCLOUD_MAINTAINER_LOGS": true,
103+
"PCLOUD_MAINTAINER_LOGS_LEVEL": "0",
104+
"PCLOUD_MAINTAINER_LOG_FILE": "",
105+
"PCLOUD_BUILD_DOC": true,
106+
"PCLOUD_WITH_TESTS": true,
107+
"PCLOUD_WITH_LAUNCHD": true,
108+
"PCLOUD_WITH_SYSTEMD": false,
109+
"PCLOUD_LAUNCHD_PLISTS_INSTALL_DIR": "${sourceDir}/out/install/${presetName}/Library/LaunchAgents",
110+
"CMAKE_C_COMPILER": "cc",
111+
"CMAKE_CXX_COMPILER": "c++",
112+
"PCLOUD_TLS_IMPL": "mbedtls"
113+
}
83114
}
84115
],
85116
"buildPresets": [
@@ -114,6 +145,17 @@
114145
"lhs": "${hostSystemName}",
115146
"rhs": "Darwin"
116147
}
148+
},
149+
{
150+
"name": "macos-armv8-apple-mbedtls-debug",
151+
"displayName": "macOS armv8: Debug / Apple Clang / Mbed TLS",
152+
"configurePreset": "macos-armv8-apple-mbedtls-debug",
153+
"configuration": "Debug",
154+
"condition": {
155+
"type": "equals",
156+
"lhs": "${hostSystemName}",
157+
"rhs": "Darwin"
158+
}
117159
}
118160
],
119161
"testPresets": [
@@ -146,6 +188,16 @@
146188
"lhs": "${hostSystemName}",
147189
"rhs": "Darwin"
148190
}
191+
},
192+
{
193+
"name": "macos-armv8-apple-mbedtls-debug",
194+
"displayName": "macOS armv8: Debug / Apple Clang / Mbed TLS",
195+
"configurePreset": "macos-armv8-apple-mbedtls-debug",
196+
"condition": {
197+
"type": "equals",
198+
"lhs": "${hostSystemName}",
199+
"rhs": "Darwin"
200+
}
149201
}
150202
]
151203
}

cmake/FindFUSE.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ if(FUSE_FOUND)
9292
set(FUSE_DEFINITIONS "-D_REENTRANT -D_FILE_OFFSET_BITS=64")
9393
elseif(sys_cpu MATCHES x86_64)
9494
set(FUSE_DEFINITIONS "-D_REENTRANT -D_FILE_OFFSET_BITS=64")
95+
elseif(sys_cpu MATCHES arm64)
96+
set(FUSE_DEFINITIONS "-D_REENTRANT -D_FILE_OFFSET_BITS=64")
9597
endif()
9698
unset(sys_cpu)
9799
endif()
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[settings]
2+
os=Macos
3+
os_build=Macos
4+
arch=armv8
5+
arch_build=armv8
6+
compiler=apple-clang
7+
compiler.version=12.0
8+
compiler.libcxx=libc++
9+
build_type=Debug
10+
11+
[options]
12+
13+
[build_requires]
14+
15+
[env]

0 commit comments

Comments
 (0)