diff options
author | Jisi Liu <liujisi@google.com> | 2015-04-02 14:36:06 -0700 |
---|---|---|
committer | Jisi Liu <liujisi@google.com> | 2015-04-02 14:36:06 -0700 |
commit | 8d9e51cf4e228c332d0a31dd1845d32b71d54e93 (patch) | |
tree | ff34f81909f44cbca6de0d57e7d0097a95a199d8 /protoc-artifacts/README.md | |
parent | 53df3201a396973d73c413c8f8f123332f130da7 (diff) | |
parent | b00a5d7ee089e03ef50ea114b42447c5ed6359b1 (diff) | |
download | protobuf-8d9e51cf4e228c332d0a31dd1845d32b71d54e93.tar.gz protobuf-8d9e51cf4e228c332d0a31dd1845d32b71d54e93.tar.bz2 protobuf-8d9e51cf4e228c332d0a31dd1845d32b71d54e93.zip |
Merge pull request #269 from zhangkun83/protoc-artifact-maven
Better support for cross-compilation
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 ``` - |