bots-garden/razorbillpublic Fork
⑂ dbbd03c
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/razorbill.git
git clone ssh://git@rickub.com/bots-garden/razorbill.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

Also CLANG_COVERAGE_MAPPING=NO: Swift compiles and the link were still instrumented

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k33g committed 2026-11-26T15:49:04+01:00 Browse files
dbbd03c parent: 23baeb5
modified .memory/handoffs/2026-11-25-v0-2-server-foundation.md +1 -1
@@ -141,7 +141,7 @@ Trap: `sed -i` on this mount drops the executable bit (seen on host.sh, host_run
141141 release.sh). After any sed -i on a script, `chmod +x` it and check `git ls-files -s`.
142142 Default port is now 7920 (the sandbox reaches a Mac server at http://host.docker.internal:7920/v1;
143143 the user may have to `sbx policy allow network localhost:7920`).
144-To verify: after a rebuild with the coverage flags, `grep -c LLVM_PROFILE_FILE` on the Release rzb
144+To verify: after a rebuild with CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO, `grep -c LLVM_PROFILE_FILE` on the Release rzb
145145 must be 0 (install.sh warns otherwise). If it is not, try other settings (e.g. building the `rzb`
146146 product scheme, or CLANG_COVERAGE_MAPPING=NO) before anything else. The host runner must be
147147 restarted to pick up its new build flags.
@@ -141,7 +141,7 @@ Trap: `sed -i` on this mount drops the executable bit (seen on host.sh, host_run
141 release.sh). After any sed -i on a script, `chmod +x` it and check `git ls-files -s`.141 release.sh). After any sed -i on a script, `chmod +x` it and check `git ls-files -s`.
142 Default port is now 7920 (the sandbox reaches a Mac server at http://host.docker.internal:7920/v1;142 Default port is now 7920 (the sandbox reaches a Mac server at http://host.docker.internal:7920/v1;
143 the user may have to `sbx policy allow network localhost:7920`).143 the user may have to `sbx policy allow network localhost:7920`).
144-To verify: after a rebuild with the coverage flags, `grep -c LLVM_PROFILE_FILE` on the Release rzb144+To verify: after a rebuild with CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO, `grep -c LLVM_PROFILE_FILE` on the Release rzb
145 must be 0 (install.sh warns otherwise). If it is not, try other settings (e.g. building the `rzb`145 must be 0 (install.sh warns otherwise). If it is not, try other settings (e.g. building the `rzb`
146 product scheme, or CLANG_COVERAGE_MAPPING=NO) before anything else. The host runner must be146 product scheme, or CLANG_COVERAGE_MAPPING=NO) before anything else. The host runner must be
147 restarted to pick up its new build flags.147 restarted to pick up its new build flags.
modified .memory/history.md +4 -0
@@ -399,3 +399,7 @@ copies of default.profraw under mlx-swift checkouts belong to mlx-swift itself (
399399 Follow-up: `xcodebuild build` refuses `-enableCodeCoverage` ("only supported when testing"); the
400400 flag is removed everywhere, only the build setting CLANG_ENABLE_CODE_COVERAGE=NO remains. Still to
401401 verify on the Mac.
402+Second follow-up: CLANG_ENABLE_CODE_COVERAGE=NO removed the C/C++ instrumentation (rzb 108 → 90
403+MB) but the build log (.build/xcode/Logs/Build/*.xcactivitylog, gzip) still showed
404+`-profile-coverage-mapping -profile-generate` on swiftc and `-fprofile-instr-generate` at link:
405+added CLANG_COVERAGE_MAPPING=NO everywhere. Still to verify on the Mac.
@@ -399,3 +399,7 @@ copies of default.profraw under mlx-swift checkouts belong to mlx-swift itself (
399 Follow-up: `xcodebuild build` refuses `-enableCodeCoverage` ("only supported when testing"); the399 Follow-up: `xcodebuild build` refuses `-enableCodeCoverage` ("only supported when testing"); the
400 flag is removed everywhere, only the build setting CLANG_ENABLE_CODE_COVERAGE=NO remains. Still to400 flag is removed everywhere, only the build setting CLANG_ENABLE_CODE_COVERAGE=NO remains. Still to
401 verify on the Mac.401 verify on the Mac.
402+Second follow-up: CLANG_ENABLE_CODE_COVERAGE=NO removed the C/C++ instrumentation (rzb 108 → 90
403+MB) but the build log (.build/xcode/Logs/Build/*.xcactivitylog, gzip) still showed
404+`-profile-coverage-mapping -profile-generate` on swiftc and `-fprofile-instr-generate` at link:
405+added CLANG_COVERAGE_MAPPING=NO everywhere. Still to verify on the Mac.
modified README.md +1 -1
@@ -82,7 +82,7 @@ The server listens on `127.0.0.1` by default. To serve your network, set an API
8282 ```bash
8383 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
8484 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \
85- CLANG_ENABLE_CODE_COVERAGE=NO
85+ CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO
8686
8787 .build/xcode/Build/Products/Release/rzb version
8888 # rzb 0.2.0 (engines: fake, mlx)
@@ -82,7 +82,7 @@ The server listens on `127.0.0.1` by default. To serve your network, set an API
82 ```bash82 ```bash
83 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \83 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
84 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \84 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \
85- CLANG_ENABLE_CODE_COVERAGE=NO85+ CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO
86 86
87 .build/xcode/Build/Products/Release/rzb version87 .build/xcode/Build/Products/Release/rzb version
88 # rzb 0.2.0 (engines: fake, mlx)88 # rzb 0.2.0 (engines: fake, mlx)
modified demos/test-qwen/README.md +2 -0
@@ -9,6 +9,8 @@
99 ```bash
1010 rzb models pull mlx-community/Qwen3.5-9B-MLX-4bit
1111 rzb models pull mlx-community/Qwen3-4B-4bit
12+ rzb models pull mlx-community/gpt-oss-20b-MXFP4-Q8
13+
1214 ```
1315
1416 2. Start the server in a terminal (`--host 0.0.0.0` is only needed to reach it from another machine):
@@ -9,6 +9,8 @@
9 ```bash9 ```bash
10 rzb models pull mlx-community/Qwen3.5-9B-MLX-4bit10 rzb models pull mlx-community/Qwen3.5-9B-MLX-4bit
11 rzb models pull mlx-community/Qwen3-4B-4bit11 rzb models pull mlx-community/Qwen3-4B-4bit
12+ rzb models pull mlx-community/gpt-oss-20b-MXFP4-Q8
13+
12 ```14 ```
13 15
14 2. Start the server in a terminal (`--host 0.0.0.0` is only needed to reach it from another machine):16 2. Start the server in a terminal (`--host 0.0.0.0` is only needed to reach it from another machine):
modified docs/en/how-to/build-on-the-mac.md +2 -2
@@ -19,7 +19,7 @@ From the repository root:
1919 ```bash
2020 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
2121 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \
22- CLANG_ENABLE_CODE_COVERAGE=NO
22+ CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO
2323 ```
2424
2525 The executable is `.build/xcode/Build/Products/Release/rzb`. Keep it in that folder (or put the folder on your `PATH`): the MLX Metal library, `mlx-swift_Cmlx.bundle`, sits next to it and is loaded at run time.
@@ -60,7 +60,7 @@ The script never overwrites or removes an `rzb` launcher it did not write.
6060 | Symptom | Fix |
6161 | --- | --- |
6262 | The build fails while compiling MLX's Metal shaders (the `metal` tool is missing) | Run `xcodebuild -downloadComponent MetalToolchain`. |
63-| A `default.profraw` file appears in the folder where `rzb` ran | `rzb` was built without `CLANG_ENABLE_CODE_COVERAGE=NO`: the package scheme gathers test coverage and instruments the Release build too. Rebuild with the command above (or `scripts/install.sh`) and delete the file. |
63+| A `default.profraw` file appears in the folder where `rzb` ran | `rzb` was built without `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO`: the package scheme gathers test coverage and instruments the Release build too. Rebuild with the command above (or `scripts/install.sh`) and delete the file. |
6464 | `Failed to load the default metallib` when a model loads | `rzb` was built with `swift build`, or copied away from `mlx-swift_Cmlx.bundle`. Build with `xcodebuild` as above and run it from `Build/Products/Release`. |
6565
6666 ## See also
@@ -19,7 +19,7 @@ From the repository root:
19 ```bash19 ```bash
20 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \20 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
21 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \21 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \
22- CLANG_ENABLE_CODE_COVERAGE=NO22+ CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO
23 ```23 ```
24 24
25 The executable is `.build/xcode/Build/Products/Release/rzb`. Keep it in that folder (or put the folder on your `PATH`): the MLX Metal library, `mlx-swift_Cmlx.bundle`, sits next to it and is loaded at run time.25 The executable is `.build/xcode/Build/Products/Release/rzb`. Keep it in that folder (or put the folder on your `PATH`): the MLX Metal library, `mlx-swift_Cmlx.bundle`, sits next to it and is loaded at run time.
@@ -60,7 +60,7 @@ The script never overwrites or removes an `rzb` launcher it did not write.
60 | Symptom | Fix |60 | Symptom | Fix |
61 | --- | --- |61 | --- | --- |
62 | The build fails while compiling MLX's Metal shaders (the `metal` tool is missing) | Run `xcodebuild -downloadComponent MetalToolchain`. |62 | The build fails while compiling MLX's Metal shaders (the `metal` tool is missing) | Run `xcodebuild -downloadComponent MetalToolchain`. |
63-| A `default.profraw` file appears in the folder where `rzb` ran | `rzb` was built without `CLANG_ENABLE_CODE_COVERAGE=NO`: the package scheme gathers test coverage and instruments the Release build too. Rebuild with the command above (or `scripts/install.sh`) and delete the file. |63+| A `default.profraw` file appears in the folder where `rzb` ran | `rzb` was built without `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO`: the package scheme gathers test coverage and instruments the Release build too. Rebuild with the command above (or `scripts/install.sh`) and delete the file. |
64 | `Failed to load the default metallib` when a model loads | `rzb` was built with `swift build`, or copied away from `mlx-swift_Cmlx.bundle`. Build with `xcodebuild` as above and run it from `Build/Products/Release`. |64 | `Failed to load the default metallib` when a model loads | `rzb` was built with `swift build`, or copied away from `mlx-swift_Cmlx.bundle`. Build with `xcodebuild` as above and run it from `Build/Products/Release`. |
65 65
66 ## See also66 ## See also
modified docs/fr/how-to/compiler-sur-le-mac.md +2 -2
@@ -19,7 +19,7 @@ Depuis la racine du dépôt :
1919 ```bash
2020 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
2121 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \
22- CLANG_ENABLE_CODE_COVERAGE=NO
22+ CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO
2323 ```
2424
2525 L'exécutable est `.build/xcode/Build/Products/Release/rzb`. Laissez-le dans ce dossier (ou ajoutez le dossier à votre `PATH`) : la bibliothèque Metal de MLX, `mlx-swift_Cmlx.bundle`, est à côté de lui et elle est chargée à l'exécution.
@@ -60,7 +60,7 @@ Le script n'écrase ni ne supprime jamais un lanceur `rzb` qu'il n'a pas écrit.
6060 | Symptôme | Solution |
6161 | --- | --- |
6262 | La compilation échoue en compilant les shaders Metal de MLX (l'outil `metal` manque) | Lancez `xcodebuild -downloadComponent MetalToolchain`. |
63-| Un fichier `default.profraw` apparaît dans le dossier où `rzb` a tourné | `rzb` a été compilé sans `CLANG_ENABLE_CODE_COVERAGE=NO` : le scheme du package mesure la couverture des tests et instrumente aussi la compilation Release. Recompilez avec la commande ci-dessus (ou `scripts/install.sh`) et supprimez le fichier. |
63+| Un fichier `default.profraw` apparaît dans le dossier où `rzb` a tourné | `rzb` a été compilé sans `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO` : le scheme du package mesure la couverture des tests et instrumente aussi la compilation Release. Recompilez avec la commande ci-dessus (ou `scripts/install.sh`) et supprimez le fichier. |
6464 | `Failed to load the default metallib` au chargement d'un modèle | `rzb` a été compilé avec `swift build`, ou copié loin de `mlx-swift_Cmlx.bundle`. Compilez avec `xcodebuild` comme ci-dessus et lancez-le depuis `Build/Products/Release`. |
6565
6666 ## Voir aussi
@@ -19,7 +19,7 @@ Depuis la racine du dépôt :
19 ```bash19 ```bash
20 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \20 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
21 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \21 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \
22- CLANG_ENABLE_CODE_COVERAGE=NO22+ CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO
23 ```23 ```
24 24
25 L'exécutable est `.build/xcode/Build/Products/Release/rzb`. Laissez-le dans ce dossier (ou ajoutez le dossier à votre `PATH`) : la bibliothèque Metal de MLX, `mlx-swift_Cmlx.bundle`, est à côté de lui et elle est chargée à l'exécution.25 L'exécutable est `.build/xcode/Build/Products/Release/rzb`. Laissez-le dans ce dossier (ou ajoutez le dossier à votre `PATH`) : la bibliothèque Metal de MLX, `mlx-swift_Cmlx.bundle`, est à côté de lui et elle est chargée à l'exécution.
@@ -60,7 +60,7 @@ Le script n'écrase ni ne supprime jamais un lanceur `rzb` qu'il n'a pas écrit.
60 | Symptôme | Solution |60 | Symptôme | Solution |
61 | --- | --- |61 | --- | --- |
62 | La compilation échoue en compilant les shaders Metal de MLX (l'outil `metal` manque) | Lancez `xcodebuild -downloadComponent MetalToolchain`. |62 | La compilation échoue en compilant les shaders Metal de MLX (l'outil `metal` manque) | Lancez `xcodebuild -downloadComponent MetalToolchain`. |
63-| Un fichier `default.profraw` apparaît dans le dossier où `rzb` a tourné | `rzb` a été compilé sans `CLANG_ENABLE_CODE_COVERAGE=NO` : le scheme du package mesure la couverture des tests et instrumente aussi la compilation Release. Recompilez avec la commande ci-dessus (ou `scripts/install.sh`) et supprimez le fichier. |63+| Un fichier `default.profraw` apparaît dans le dossier où `rzb` a tourné | `rzb` a été compilé sans `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO` : le scheme du package mesure la couverture des tests et instrumente aussi la compilation Release. Recompilez avec la commande ci-dessus (ou `scripts/install.sh`) et supprimez le fichier. |
64 | `Failed to load the default metallib` au chargement d'un modèle | `rzb` a été compilé avec `swift build`, ou copié loin de `mlx-swift_Cmlx.bundle`. Compilez avec `xcodebuild` comme ci-dessus et lancez-le depuis `Build/Products/Release`. |64 | `Failed to load the default metallib` au chargement d'un modèle | `rzb` a été compilé avec `swift build`, ou copié loin de `mlx-swift_Cmlx.bundle`. Compilez avec `xcodebuild` comme ci-dessus et lancez-le depuis `Build/Products/Release`. |
65 65
66 ## Voir aussi66 ## Voir aussi
modified scripts/install.sh +1 -1
@@ -60,7 +60,7 @@ if [[ "$build" == true ]]; then
6060 # Release build too: rzb would write default.profraw in the current folder at every exit.
6161 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
6262 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \
63- CLANG_ENABLE_CODE_COVERAGE=NO
63+ CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO
6464 fi
6565
6666 [[ -x "$products/rzb" ]] || fail "$products/rzb not found: build first (drop --no-build)"
@@ -60,7 +60,7 @@ if [[ "$build" == true ]]; then
60 # Release build too: rzb would write default.profraw in the current folder at every exit.60 # Release build too: rzb would write default.profraw in the current folder at every exit.
61 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \61 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
62 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \62 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation \
63- CLANG_ENABLE_CODE_COVERAGE=NO63+ CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO
64 fi64 fi
65 65
66 [[ -x "$products/rzb" ]] || fail "$products/rzb not found: build first (drop --no-build)"66 [[ -x "$products/rzb" ]] || fail "$products/rzb not found: build first (drop --no-build)"
modified scripts/release.sh +1 -1
@@ -43,7 +43,7 @@ if [[ -z "$products" ]]; then
4343 # Release build too: rzb would write default.profraw in the current folder at every exit.
4444 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
4545 -derivedDataPath .build/release -skipPackagePluginValidation -skipMacroValidation \
46- CLANG_ENABLE_CODE_COVERAGE=NO
46+ CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO
4747 products=.build/release/Build/Products/Release
4848 fi
4949
@@ -43,7 +43,7 @@ if [[ -z "$products" ]]; then
43 # Release build too: rzb would write default.profraw in the current folder at every exit.43 # Release build too: rzb would write default.profraw in the current folder at every exit.
44 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \44 xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
45 -derivedDataPath .build/release -skipPackagePluginValidation -skipMacroValidation \45 -derivedDataPath .build/release -skipPackagePluginValidation -skipMacroValidation \
46- CLANG_ENABLE_CODE_COVERAGE=NO46+ CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO
47 products=.build/release/Build/Products/Release47 products=.build/release/Build/Products/Release
48 fi48 fi
49 49
modified tools/host-runner/host_runner.py +1 -1
@@ -59,7 +59,7 @@ def xcodebuild(action: str, scheme: str) -> list[str]:
5959 if action != "test":
6060 # Otherwise the scheme's test coverage instruments Release builds as well, and the
6161 # binaries write default.profraw wherever they run.
62- command.append("CLANG_ENABLE_CODE_COVERAGE=NO")
62+ command += ["CLANG_ENABLE_CODE_COVERAGE=NO", "CLANG_COVERAGE_MAPPING=NO"]
6363 return command
6464
6565
@@ -59,7 +59,7 @@ def xcodebuild(action: str, scheme: str) -> list[str]:
59 if action != "test":59 if action != "test":
60 # Otherwise the scheme's test coverage instruments Release builds as well, and the60 # Otherwise the scheme's test coverage instruments Release builds as well, and the
61 # binaries write default.profraw wherever they run.61 # binaries write default.profraw wherever they run.
62- command.append("CLANG_ENABLE_CODE_COVERAGE=NO")62+ command += ["CLANG_ENABLE_CODE_COVERAGE=NO", "CLANG_COVERAGE_MAPPING=NO"]
63 return command63 return command
64 64
65 65
modified tools/host-runner/test_host_runner.py +1 -0
@@ -42,6 +42,7 @@ class CommandForTests(unittest.TestCase):
4242 def test_release_builds_are_not_instrumented_for_coverage(self):
4343 argv, _ = runner.command_for("build", {"project": ".", "scheme": "razorbill"})
4444 self.assertIn("CLANG_ENABLE_CODE_COVERAGE=NO", argv)
45+ self.assertIn("CLANG_COVERAGE_MAPPING=NO", argv)
4546
4647 def test_run_passes_arguments_as_a_list(self):
4748 argv, _ = runner.command_for(
@@ -42,6 +42,7 @@ class CommandForTests(unittest.TestCase):
42 def test_release_builds_are_not_instrumented_for_coverage(self):42 def test_release_builds_are_not_instrumented_for_coverage(self):
43 argv, _ = runner.command_for("build", {"project": ".", "scheme": "razorbill"})43 argv, _ = runner.command_for("build", {"project": ".", "scheme": "razorbill"})
44 self.assertIn("CLANG_ENABLE_CODE_COVERAGE=NO", argv)44 self.assertIn("CLANG_ENABLE_CODE_COVERAGE=NO", argv)
45+ self.assertIn("CLANG_COVERAGE_MAPPING=NO", argv)
45 46
46 def test_run_passes_arguments_as_a_list(self):47 def test_run_passes_arguments_as_a_list(self):
47 argv, _ = runner.command_for(48 argv, _ = runner.command_for(