|
237 | 237 | test.contains({ "-pg" }, clang.getcxxflags(cfg)) |
238 | 238 | test.contains({ "-pg" }, clang.getldflags(cfg)) |
239 | 239 | end |
| 240 | + |
| 241 | +-- |
| 242 | +-- Make sure system or architecture flags are added properly. |
| 243 | +-- |
| 244 | + |
| 245 | + function suite.cflags_onX86() |
| 246 | + architecture "x86" |
| 247 | + prepare() |
| 248 | + test.contains({ "-m32" }, clang.getcflags(cfg)) |
| 249 | + end |
| 250 | + |
| 251 | + function suite.ldflags_onX86() |
| 252 | + architecture "x86" |
| 253 | + prepare() |
| 254 | + test.contains({ "-m32" }, clang.getldflags(cfg)) |
| 255 | + end |
| 256 | + |
| 257 | + function suite.cflags_onX86_64() |
| 258 | + architecture "x86_64" |
| 259 | + prepare() |
| 260 | + test.contains({ "-m64" }, clang.getcflags(cfg)) |
| 261 | + end |
| 262 | + |
| 263 | + function suite.ldflags_onX86_64() |
| 264 | + architecture "x86_64" |
| 265 | + prepare() |
| 266 | + test.contains({ "-m64" }, clang.getldflags(cfg)) |
| 267 | + end |
| 268 | + |
| 269 | + function suite.cflags_macosx_onX86() |
| 270 | + system "macosx" |
| 271 | + architecture "x86" |
| 272 | + prepare() |
| 273 | + test.excludes({ "-m32" }, clang.getcflags(cfg)) |
| 274 | + test.contains({ "-arch i386" }, clang.getcflags(cfg)) |
| 275 | + end |
| 276 | + |
| 277 | + function suite.ldflags_macosx_onX86() |
| 278 | + system "macosx" |
| 279 | + architecture "x86" |
| 280 | + prepare() |
| 281 | + test.excludes({ "-m32" }, clang.getldflags(cfg)) |
| 282 | + test.contains({ "-arch i386" }, clang.getldflags(cfg)) |
| 283 | + end |
| 284 | + |
| 285 | + function suite.cflags_macosx_onX86_64() |
| 286 | + system "macosx" |
| 287 | + architecture "x86_64" |
| 288 | + prepare() |
| 289 | + test.excludes({ "-m64" }, clang.getcflags(cfg)) |
| 290 | + test.contains({ "-arch x86_64" }, clang.getcflags(cfg)) |
| 291 | + end |
| 292 | + |
| 293 | + function suite.ldflags_macosx_onX86_64() |
| 294 | + system "macosx" |
| 295 | + architecture "x86_64" |
| 296 | + prepare() |
| 297 | + test.excludes({ "-m64" }, clang.getldflags(cfg)) |
| 298 | + test.contains({ "-arch x86_64" }, clang.getldflags(cfg)) |
| 299 | + end |
| 300 | + |
| 301 | + function suite.cflags_macosx_onarm64() |
| 302 | + system "macosx" |
| 303 | + architecture "arm64" |
| 304 | + prepare() |
| 305 | + test.contains({ "-arch arm64" }, clang.getcflags(cfg)) |
| 306 | + end |
| 307 | + |
| 308 | + function suite.ldflags_macosx_onarm64() |
| 309 | + system "macosx" |
| 310 | + architecture "arm64" |
| 311 | + prepare() |
| 312 | + test.contains({ "-arch arm64" }, clang.getldflags(cfg)) |
| 313 | + end |
0 commit comments