aboutsummaryrefslogtreecommitdiffhomepage
path: root/protoc-artifacts
diff options
context:
space:
mode:
authorGravatar Kun Zhang <zhangkun@google.com>2015-04-01 16:32:21 -0700
committerGravatar Kun Zhang <zhangkun@google.com>2015-04-01 16:32:21 -0700
commit74c4b648cb0a29a8ca29681d5144eca295ed2cf7 (patch)
treeac797bbfc7d41694ceab3780d51e9ee5b4a25153 /protoc-artifacts
parentc8eda8e9d8e91a94b7e060b4a0d3ef21f4224a5a (diff)
Make cross-compilation possible
Diffstat (limited to 'protoc-artifacts')
-rw-r--r--protoc-artifacts/README.md11
-rw-r--r--protoc-artifacts/pom.xml2
2 files changed, 12 insertions, 1 deletions
diff --git a/protoc-artifacts/README.md b/protoc-artifacts/README.md
index e99e4745..caabc1cb 100644
--- a/protoc-artifacts/README.md
+++ b/protoc-artifacts/README.md
@@ -28,6 +28,17 @@ The following command will install the ``protoc`` artifact to your local Maven r
$ mvn install
```
+## Cross-compilation
+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 arhitecture
+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:
+```
+$ mvn install -Dos.detected.arch=x86_32
+```
+
## To push artifacts to Maven Central
Before you can upload artifacts to Maven Central repository, make sure you have
read [this page](http://central.sonatype.org/pages/apache-maven.html) on how to
diff --git a/protoc-artifacts/pom.xml b/protoc-artifacts/pom.xml
index 2536cad6..7db7b53d 100644
--- a/protoc-artifacts/pom.xml
+++ b/protoc-artifacts/pom.xml
@@ -77,7 +77,7 @@
<artifacts>
<artifact>
<file>${basedir}/target/protoc.exe</file>
- <classifier>${os.detected.classifier}</classifier>
+ <classifier>${os.detected.name}-${os.detected.arch}</classifier>
<type>exe</type>
</artifact>
</artifacts>