`tensorflow::RunOptions::RunOptions(void)` symbol missing in built tensorflow.dll (Windows)
@advnpzn,
Could you please provide the complete error log of the installation process which helps us to debug the issue in an effective way. Thank you! Hi @tilakrayal 

Could you please specify which logs do you want specifically?
I could provide you the bazel build log for `tensorflow.dll` and the error output I get while compiling/linking a sample program with that `tensorflow.dll`. @advnpzn,
The logs which are available while trying to build the tensorflow on WIndows would be helpful for us to debug the issue and provide the resolution. Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/66490">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/66490">No</a>

### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

source

### TensorFlow version

tf 2.16.1

### Custom code

No

### OS platform and distribution

Windows 11 23H2 Build 22631.3296

### Mobile device

N/A

### Python version

3.11.2

### Bazel version

6.5.0

### GCC/compiler version

LLVM/clang 17.0.6 & MSVC 19.29.30154

### CUDA/cuDNN version

N/A

### GPU model and memory

N/A

### Current behavior?

I was trying to build the `tensorflow.dll` in Windows to use the C++ API in my code. After successfully building `tensorflow.dll` and trying to use it in the code, I had faced several missing symbols error while linking. But by adding `TF_EXPORT` I was able to remove most of it. But there was still one symbol that was missing, which is `tensorflow::RunOptions::RunOptions(void)`.

As far as I observed this is from a dynamically generated `config.pb.h` from `tensorflow/core/protobuf/config.proto`. What I have tried is to apply `TF_EXPORT` to the generated `config.pb.h` file in relevant places. But as soon as I run the bazel build command for the target, The `config.pb.h` and the `config.pb.cc` files are regenerated, thus whatever changes I made for exporting those symbols invalid. And after the build I still get the same `tensorflow::RunOptions::RunOptions(void)` symbol missing error while linking.

My question is how can I specifically export symbols from dynamically generated stub files from proto files while building ?
I was surprised no one has faced this problem before.

### Standalone code to reproduce the issue

```shell
Build tensorflow with the following command.

`bazelisk.exe build --config=opt --config=win_clang //tensorflow:tensorflow.dll //tensorflow:tensorflow_dll_import_lib //tensorflow:install_headers`

Use the resulting `tensorflow.dll` and `tensorflow.lib` to compile custom code in MSVC.


    std::string filename = std::filesystem::path(model).filename().string();
    filename.resize(filename.length() - 3);
    tensorflow::SavedModelBundle bundle;
    tensorflow::SessionOptions session_options;
    tensorflow::RunOptions run_options;
    run_options.Clear();
    tensorflow::Status status = tensorflow::LoadSavedModel(session_options, run_options, model, { }, & bundle);
```


### Relevant log output

```shell
unresolved external symbol "__declspec(dllimport) public: __cdecl tensorflow::RunOptions::RunOptions(void)" (__imp_??0RunOptions@tensorflow@@QEAA@XZ) referenced in function "public: bool __cdecl ModelCollection::Add_v2(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?Add_v2@ModelCollection@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAV23@@Z)
```
