summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-04-25 15:19:13 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-05-23 15:02:45 +0200
commitc1a55baf143014fe429b8185270067d790539f02 (patch)
tree6bf712f50bf5d25ae19066bd60e8ec757af8a217 /doc
parent3799c3d77b4d9e40aa2dc4190ca4aaa0bdd61d6d (diff)
downloadjustbuild-c1a55baf143014fe429b8185270067d790539f02.tar.gz
tutorial: Add DWP and ADD_DEBUGFLAGS
...to example export targets and defaults.
Diffstat (limited to 'doc')
-rw-r--r--doc/tutorial/debugging.md21
-rw-r--r--doc/tutorial/hello-world.md1
-rw-r--r--doc/tutorial/third-party-software.md10
3 files changed, 17 insertions, 15 deletions
diff --git a/doc/tutorial/debugging.md b/doc/tutorial/debugging.md
index f9851f50..ab35e591 100644
--- a/doc/tutorial/debugging.md
+++ b/doc/tutorial/debugging.md
@@ -26,28 +26,21 @@ flags) for our example project. This can be done by extending the existing
``` {.jsonc srcname="tutorial-defaults/CC/TARGETS"}
{ "defaults":
{ "type": ["CC", "defaults"]
- , "arguments_config": ["DEBUG"]
, "CC": ["cc"]
, "CXX": ["c++"]
- , "ADD_COMPILE_FLAGS":
- { "type": "++"
- , "$1":
- [ ["-O2", "-Wall"]
- , { "type": "if"
- , "cond": {"type": "var", "name": "DEBUG"}
- , "then": ["-g"]
- }
- ]
- }
+ , "ADD_COMPILE_FLAGS": ["-O2", "-Wall"]
+ , "ADD_DEBUGFLAGS": ["-O2", "-Wall", "-g"]
, "AR": ["ar"]
+ , "DWP": ["dwp"]
, "PATH": ["/bin", "/usr/bin"]
}
}
```
-This states that when the `DEBUG` configuration argument is set, the C/C++ flags
-should contain `-g` to generate debug information for `gdb(1)`. As this updated
-`TARGETS` file is under version control, we need to commit the changes:
+This states that when in debug mode a different set of C/C++ flags should be
+used, in this case the ones from release mode plus the `-g` flag to generate
+debug information for `gdb(1)`. As this updated `TARGETS` file is under version
+control, we need to commit the changes:
``` sh
$ git add tutorial-defaults
diff --git a/doc/tutorial/hello-world.md b/doc/tutorial/hello-world.md
index 2861364a..eabcaf49 100644
--- a/doc/tutorial/hello-world.md
+++ b/doc/tutorial/hello-world.md
@@ -211,6 +211,7 @@ from. In our case, we don't use any base.
, "CXX": ["c++"]
, "ADD_COMPILE_FLAGS": ["-O2", "-Wall"]
, "AR": ["ar"]
+ , "DWP": ["dwp"]
, "PATH": ["/bin", "/usr/bin"]
}
}
diff --git a/doc/tutorial/third-party-software.md b/doc/tutorial/third-party-software.md
index 38afd434..0016f6b8 100644
--- a/doc/tutorial/third-party-software.md
+++ b/doc/tutorial/third-party-software.md
@@ -111,7 +111,15 @@ The top-level `TARGETS` file contains the following content:
{ "fmt":
{ "type": "export"
, "target": ["src", "fmt"]
- , "flexible_config": ["CXX", "CXXFLAGS", "ADD_CXXFLAGS", "AR", "ENV", "DEBUG"]
+ , "flexible_config":
+ [ "CXX"
+ , "CXXFLAGS"
+ , "ADD_CXXFLAGS"
+ , "AR"
+ , "DWP"
+ , "ENV"
+ , "DEBUG"
+ ]
}
}
```