# \#unsafeflags

**URL:** https://forums.swift.org/tag/unsafeflags/367.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [How am I supposed to consume a package with "unsafe flags" in my app?](https://forums.swift.org/t/how-am-i-supposed-to-consume-a-package-with-unsafe-flags-in-my-app/81511)

<div class="topic-metadata">

**Author:** [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Replies:** 5\
**Last updated:** [August 6, 2025, 11:54pm UTC](https://forums.swift.org/t/how-am-i-supposed-to-consume-a-package-with-unsafe-flags-in-my-app/81511 "2025-08-06T23:54:44Z")

</div>

I'm trying to use OCMock in a project. The package product 'OCMock' cannot be used as a dependency of this target because it uses unsafe build flags. Great. I saw somewhere that specifying a commit hash instead of a ve…

---

## [SPM Package.swift linkerSettings passed to dependent main app target](https://forums.swift.org/t/spm-package-swift-linkersettings-passed-to-dependent-main-app-target/69364)

<div class="topic-metadata">

**Author:** [@andrei\_shen](https://forums.swift.org/u/andrei_shen)\
**Replies:** 0\
**Last updated:** [January 10, 2024, 12:24am UTC](https://forums.swift.org/t/spm-package-swift-linkersettings-passed-to-dependent-main-app-target/69364 "2024-01-10T00:24:19Z")

</div>

Linker flag specified in Package.swift as unsafe flag is passed to main app target. steps: create empty package add linkerSettings: \[.unsafeFlags(\["-Wl,-make\_mergeable"\])\] to target import PackageDescription let pac…

---

## [Getting optimization information using the \`-Rpass\` flags](https://forums.swift.org/t/getting-optimization-information-using-the-rpass-flags/68895)

<div class="topic-metadata">

**Author:** [@\_ck512](https://forums.swift.org/u/_ck512)\
**Replies:** 1\
**Last updated:** [December 8, 2023, 6:07pm UTC](https://forums.swift.org/t/getting-optimization-information-using-the-rpass-flags/68895 "2023-12-08T18:07:16Z")

</div>

I would like to get information about optimization passes performed/missed by swiftc in my swiftpm project using the "-Rpass", "-Rpass-missed" etc flags. I added them to my target executable by passing them as unsafeFlag…
