diff options
author | Kun Zhang <zhangkun@google.com> | 2015-04-02 13:14:29 -0700 |
---|---|---|
committer | Kun Zhang <zhangkun@google.com> | 2015-04-02 13:14:29 -0700 |
commit | b00a5d7ee089e03ef50ea114b42447c5ed6359b1 (patch) | |
tree | ff34f81909f44cbca6de0d57e7d0097a95a199d8 /protoc-artifacts/README.md | |
parent | 53df3201a396973d73c413c8f8f123332f130da7 (diff) | |
download | protobuf-b00a5d7ee089e03ef50ea114b42447c5ed6359b1.tar.gz protobuf-b00a5d7ee089e03ef50ea114b42447c5ed6359b1.tar.bz2 protobuf-b00a5d7ee089e03ef50ea114b42447c5ed6359b1.zip |
Document more about cross-compilation; Post-build check for the actual arch of the artifact
Diffstat (limited to 'protoc-artifacts/README.md')
-rw-r--r-- | protoc-artifacts/README.md | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/protoc-artifacts/README.md b/protoc-artifacts/README.md index c6296462..2f3ed218 100644 --- a/protoc-artifacts/README.md +++ b/protoc-artifacts/README.md @@ -32,9 +32,19 @@ $ mvn install The Maven script will try to detect the OS and the architecture from Java system properties. It's possible to build a protoc binary for an architecture that is different from what Java has detected, as long as you have the proper -compilers installed. For example, MingGW32 only ships with 32-bit compilers, -but you can still build 32-bit protoc under a 64-bit system, with the following -command: +compilers installed. + +You can override the Maven properties ``os.detected.name`` and +``os.detected.arch`` to force the script to generate binaries for a specific OS +and/or architecture. Valid values are defined as the return values of +``normalizeOs()`` and ``normalizeArch()`` of ``Detector`` from +[os-maven-plugin](https://github.com/trustin/os-maven-plugin/blob/master/src/main/java/kr/motd/maven/os/Detector.java). +Frequently used values are: +- ``os.detected.name``: ``linux``, ``osx``, ``windows``. +- ``os.detected.arch``: ``x86_32``, ``x86_64`` + +For example, MingGW32 only ships with 32-bit compilers, but you can still build +32-bit protoc under 64-bit Windows, with the following command: ``` $ mvn install -Dos.detected.arch=x86_32 ``` @@ -48,4 +58,3 @@ Use the following command to upload artifacts: ``` $ mvn clean deploy -P release ``` - |