Skip to content

Commit de35756

Browse files
committed
docs: unify user journey and clarify build and early deployment flow
1 parent 54dcdb7 commit de35756

2 files changed

Lines changed: 29 additions & 9 deletions

File tree

api/docs/building.dox

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
****************************************************************************
3535
\page page_building Building from Source
3636

37-
\section build_quick Quick Start: First Build
37+
\section build_quick Quick Start
3838

3939
If you don't need to modify DR and just need a recent build, you can download [weekly package builds](@ref page_weekly_builds).
4040

@@ -55,10 +55,16 @@ To build DynamoRIO on Linux, use the following commands as a guide. This builds
5555
$ cmake ..
5656
# Build.
5757
$ make -j
58+
# Run echo under DR to see if it works. If you configured for a debug or 32-bit
59+
# build, your path will be different. For example, a 32-bit debug build would
60+
# put drrun in ./bin32/ and need -debug flag to run debug build.
61+
$ ./bin64/drrun echo hello world
62+
hello world
5863
```
5964

6065
To validate a build by running a target under DynamoRIO, see \ref page_deploy.
6166

67+
6268
\subsection build_quick_windows Windows
6369

6470
To build DynamoRIO on Windows, first install the following software.
@@ -85,10 +91,17 @@ To build 64-bit DynamoRIO in release mode, launch the `Visual Studio 2022 > x64
8591
# Studio and build from there. You must pass --config to work around a cmake
8692
# bug. (http://www.cmake.org/Bug/view.php?id=11830)
8793
$ cmake --build . --config RelWithDebInfo
94+
# Run notepad under DR to see whether it worked.
95+
$ bin64\drrun.exe notepad.exe
8896
```
8997

9098
To validate a build by running a target under DynamoRIO, see \ref page_deploy.
9199

100+
For 32-bit builds, alternative prompts, and Ninja guidance, see
101+
\ref build_windows_variants.
102+
103+
----------------
104+
92105
\section build_install Install and Build Outputs
93106

94107
This section describes where build artifacts are produced and how the layout
@@ -172,6 +185,13 @@ $ CFLAGS=-m32 CXXFLAGS=-m32 cmake -DDEBUG=ON ..
172185
$ make -j
173186
```
174187

188+
\subsection build_install_local Installing from a Local Build
189+
190+
To mirror the layout and functionality of an official released package, build the `install` target. The `CMAKE_INSTALL_PREFIX` cmake variable controls the destination of the installation.
191+
192+
Once you've installed locally, you can now point at the installation just like you'd point at a release package for the purposes of building separate clients.
193+
194+
175195
\subsection build_windows_variants Windows Build Variants
176196

177197
If you need a 32-bit build, choose `x86 Native Tools Command Prompt` and pass
@@ -391,7 +411,7 @@ Support for aarch64-on-x86 on Windows is not yet finished; nor is support for ot
391411

392412
\subsection build_windows_details Details for Building on Windows
393413

394-
## Compiler
414+
\subsubsection build_windows_compiler Compiler
395415

396416
First, you need the compiler, linker, and associated tools.
397417
Install Visual Studio 2022 which is the version used by our automated tests.
@@ -410,7 +430,7 @@ environment to use the x64 tools. As mentioned above, you can launch the
410430
command prompt from the Visual Studio Start menu folder, or run the
411431
"vcvarsall.bat amd64" script.
412432

413-
## CMake
433+
\subsubsection build_windows_cmake CMake
414434

415435
You need CMake (version 3.14+) for Windows (*not* for Cygwin, as we need to pass paths
416436
with drive letters to our compiler). You can download a binary installation here:
@@ -419,7 +439,7 @@ with drive letters to our compiler). You can download a binary installation her
419439

420440
Install CMake and put its bin directory on the path for your shell.
421441

422-
## Other Tools
442+
\subsubsection build_windows_other_tools Other Tools
423443

424444
In order to build you must have a version of perl. It can be either a
425445
Cygwin perl or a native Windows perl.
@@ -431,7 +451,7 @@ In order to build the documentation, you will additionally need:
431451
These can be either Cygwin packages or native Windows.
432452
TH`.
433453

434-
## Using Cygwin
454+
\subsubsection build_windows_cygwin Using Cygwin
435455

436456
If you wish to run your build commands in a Cygwin bash shell, you will need to
437457
set up your environment the way that Visual Studio sets up the environment.

api/docs/deployment.dox

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ bin32/drrun.exe -c samples/bin32/bbsize.dll -- notepad
244244
\endcode
245245

246246
Alternatively, you can first run \c notepad.exe, and then use \c drrun
247-
to attach to it. Attaching is an experimental feature and is not yet as
248-
well-supported as launching a new process:
247+
to attach to it, but please note that attaching is an experimental
248+
feature and is not yet as well-supported as launching a new process:
249249
\code
250250
bin32/drrun.exe -attach <notepad_pid> -c samples/bin32/bbsize.dll
251251
\endcode
@@ -351,8 +351,8 @@ under DynamoRIO with the bbsize sample client:
351351
\endcode
352352

353353
Alternatively, you can first run the target, and then use \c drrun
354-
to attach to it. Attaching is an experimental feature and is not yet as
355-
well-supported as launching a new process.
354+
to attach to it, but please note that attaching is an experimental
355+
feature and is not yet as well-supported as launching a new process.
356356
In particular, if the application is in the middle of a blocking syscall,
357357
DynamoRIO will wait for that to finish. To instead force interruption of
358358
the syscall, additionally pass -skip_syscall.

0 commit comments

Comments
 (0)